set-file-ids ( path uid gid -- ) (original) (raw)
set-file-ids ( path uid gid -- )
Inputs
path | a pathname string |
---|---|
uid | an integer |
gid | an integer |
Outputs
None
Word description
Sets the user id and group id of a file with a single library call.
Definition
USING: io.backend kernel unix unix.ffi ;
: set-file-ids ( path uid gid -- )
[ normalize-path ] 2dip [ -1 or ] bi@
[ chown ] unix-system-call drop ;