You are here
File command ACCESS
If there is insufficient information on this page and you wish learn more about ACCESS, please send an email to firstname.lastname@example.org. You can help to improve information about ACCESS by submitting an article using the comments link below. Note, an offline language reference text file is now avialable – see the Download section.
- file – A string expression that follows OS file naming conventions.
Returns file permissions as per chmod() and stat() system calls.
The bits (in octal):
|04000||set user ID on execution|
|02000||set group ID on execution|
|00400||read by owner|
|00200||write by owner|
|00100||execute/search by owner|
|00040||read by group|
|00020||write by group|
|00010||execute/search by group|
|00004||read by others|
|00002||write by others|
|00001||execute/search by others|
PalmOS, The return value is always 0777.
DOS, The return value depends on DJGPP’s stat() function. Possible Unix compatible.
Windows, The return value depends on Cygnus’s stat() function. Possible Unix compatible.
IF ACCESS("/bin/sh") AND 0o4 THEN PRINT "I can read it!" ENDIF