fileperms Gets file permissions &reftitle.description; intfalsefileperms stringfilename Gets permissions for the given file. &reftitle.parameters; filename Path to the file. &reftitle.returnvalues; Returns the file's permissions as a numeric mode. Lower bits of this mode are the same as the permissions expected by chmod, however on most platforms the return value will also include information on the type of file given as filename. The examples below demonstrate how to test the return value for specific permissions and file types on POSIX systems, including Linux and macOS. For local files, the specific return value is that of the st_mode member of the structure returned by the C library's stat function. Exactly which bits are set can vary from platform to platform, and looking up your specific platform's documentation is recommended if parsing the non-permission bits of the return value is required. Returns &false; on failure. &reftitle.errors; &fs.emits.warning.on.failure; &reftitle.examples; Display permissions as an octal value ]]> &example.outputs; Display full permissions ]]> &example.outputs; &reftitle.notes; ¬e.clearstatcache; &tip.fopen-wrapper.stat; &reftitle.seealso; chmod is_readable stat