public static final void setPermission ( Path path , String perms ) throws IOException { checkFileType ( path , perms ) ; if ( supports ( "posix" ) ) { Set < PosixFilePermission > posixPerms = PosixFilePermissions . fromString ( permsPart ( perms ) ) ; Files . setPosixFilePermissions ( path , posixPerms ) ; } else { JavaLogging . getLogger ( PosixHelp . class ) . warning ( "no posix support. setPermission(%s, %s)" , path , perms ) ; } }
Set posix permissions if supported .