public static boolean mkdirs ( FileSystem fs , Path dir , FsPermission permission ) throws IOException { // create the directory using the default permission boolean result = fs . mkdirs ( dir ) ; // set its permission to be the supplied one fs . setPermission ( dir , permission ) ; return result ; }
create a directory with the provided permission The permission of the directory is set to be the provided permission as in setPermission not permission&~umask