PHP » PYTHON |
login |
register |
about
|
PYTHON fileperms
is this article helpful?
|
Python replacement for PHP's fileperms
[
edit
| history
]
import os os.stat(filename).st_mode fileperms(PHP 4, PHP 5) fileperms — Gets file permissions Description
int fileperms
( string $filename
)
Gets permissions for the given file. Parameters
Return ValuesReturns the permissions on the file, or FALSE in case of an error. Examples
Example #1 Display permissions as an octal value
<?php The above example will output: 1777 0644
Example #2 Display full permissions
<?php The above example will output: -rw-r--r--
Notes
Tip
As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to List of Supported Protocols/Wrappers for a listing of which wrappers support stat() family of functionality. See Also
|
more
Recently updated
more
Most requested
more
Last requests
|