Menu Samaritan's Purse

FILEPERMS

Gets file permissions

SYNTAX

fileperms ( string $filename ) : int

PARAMETERS

filename

Path to the file.

RETURN

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.

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.

EXAMPLES

1

33188

2

0644

3

rrw-r--r--

PHP