Subversion Repository Public Repository

litesoft

Diff Revisions 346 vs 360 for /trunk/Java/ScarPlus/src/com/esotericsoftware/utils/FileUtil.java

Diff revisions: vs.
  @@ -77,6 +77,15 @@
77 77 return pToTest;
78 78 }
79 79
80 + public static File assertIsDirectory( String pWhat, File pToTest )
81 + {
82 + if ( !assertExists( pWhat, pToTest ).isDirectory() )
83 + {
84 + throw new IllegalArgumentException( pWhat + " not a directory: " + pToTest.getAbsolutePath() );
85 + }
86 + return pToTest;
87 + }
88 +
80 89 /**
81 90 * Reads to the end of the input stream and writes the bytes to the output stream.
82 91 */