API15:JPath/canChmod
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
Checks if a path's permissions can be changed
Syntax
canChmod($path)
| Parameter Name | Default Value | Description |
|---|---|---|
| $path | $path Path to check |
Returns
boolean True if path can have mode changed
Defined in
libraries/joomla/filesystem/path.php
Importing
jimport( 'joomla.filesystem.path' );
Source Body
function canChmod($path) { $perms = fileperms($path); if ($perms !== false) { if (@ chmod($path, $perms ^ 0001)) { @chmod($path, $perms); return true; } } return false; }
[Edit See Also] SeeAlso:JPath/canChmod
Examples
<CodeExamplesForm />
