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