Handbook
Glossary
file-writable? ( path -- ? )
Factor handbook
»
Input and output
»
File system metadata
Prev:
file-readable? ( path -- ? )
Next:
file-executable? ( path -- ? )
Vocabulary
io
.
files
.
info
Inputs
path
a pathname string
Outputs
?
a
boolean
Word description
Returns whether the file specified by
path
is writable by the current process.
Errors
Throws an error if the file does not exist.
Definition
USING:
system
;
IN:
io.files.info
HOOK:
file-writable?
os
( path -- ? )
Methods
USING:
io.files.info
io.files.info.unix.private
system
unix.ffi
;
M:
unix
file-writable?
W_OK
access?
;