private void ensureDirectoryExists ( FileSystem fs , Path path ) throws IOException { if ( ! fs . exists ( path ) ) { LOG . debug ( "Creating directory: {}" , path ) ; if ( ! fs . mkdirs ( path ) ) { throw new IOException ( "Can't create directory: " + path ) ; } } }
Ensure that given directory exists .