Module: builtins

$access/2 — determine accessability of a file


'$access'(FileName, AccessMode)


FileName can be a symbol, a UIA, or a list of ASCII characters. ‘$access’/2 checks whether or not the given file is accessible with the given mode, where AccessMode should be one of the following :

    4 : write
    2 : read
    0 : existence

These access modes are used as indicated on Unix systems and the Macintosh. However, they are ignored on DOS systems. On DOS systems, the file is only checked as to whether or not it is read accessible.


?- '$access'('../foo/foobar.pl', 2) .