routine file_check_access ( file: file_t; RPT out allowed: int);
Find out what kind of access this file permits the current user (regardless of
the current open modes for this port).
allowed is a bitwise or of
O_EXEC. This is not necessarily the same as what an
exec would allow;
O_EXEC is set for root even if no executable
bits are on (in which case
file exec should fail) and
is set a directory can be modified, even though it can't be written directly.