public File createDir ( File dir ) throws DataUtilException { if ( dir == null ) { throw new DataUtilException ( "Dir parameter can not be a null value" ) ; } if ( dir . exists ( ) ) { throw new DataUtilException ( "Directory already exists: " + dir . getAbsolutePath ( ) ) ; } if ( ! dir . mkdir ( ) ) { throw new DataUtilException ( "The result of File.mkDir() was false. Failed to create directory. : " + dir . getAbsolutePath ( ) ) ; } trackedFiles . add ( dir ) ; return dir ; }
Create and add a new directory