chmod


Description:

public static bool chmod (Path path, int mode)

Changes the file mode (permissions) of the specified path.

Example:

    var path = new Path ("/tmp/script.sh");
bool ok = Files.chmod (path, 0755);

Parameters:

path

path to file or directory.

mode

the permission mode (e.g. 0644, 0755).

Returns:

true if permissions were changed, false otherwise.