set-file-permissions ( path n -- )
Unix file attributes ยป Unix file permissions

Prev:remove-file-permissions ( path n -- )
Next:set-uid ( path ? -- )


Vocabulary
io.files.info.unix

Inputs
patha pathname string
nan integer, interpreted as a string of bits


Outputs
None

Word description
Sets the file permissions for a given file with the supplied Unix permissions integer.

Examples
Using the traditional octal value:
USING: io.files.info.unix kernel ; "resource:LICENSE.txt" 0o755 set-file-permissions

Higher-level, setting named bits:
USING: io.files.info.unix kernel literals ; "resource:LICENSE.txt" flags{ USER-ALL GROUP-READ GROUP-EXECUTE OTHER-READ OTHER-EXECUTE } set-file-permissions


Definition