Alter permissions on a *nix file system.
The system optionally will call clearstatcache() and it is recommended that you are familiar with this PHP method: http://php.net/manual/en/function.clearstatcache.php. Only tested on Centos5. May require a system administrator to give some permissions on your server. This is beyond the scope of this documentation.
package | dstruct_filetools |
---|---|
todo | Test and document on Ubuntu |
todo | Some permissions changes were needed to allow this to work. Test and document. |
__construct(string $path)
string
The path to the file or folder of interest
\DStructGeneralException |
---|
change(array $options)
$options is an array with the optional elements: chmod = Octal representation of the permsission e.g. 0755 not 755 group = Group name or number owner = Owner name or number If no options are provided, the defaults in Prefs are used.
link | http://php.net/manual/en/function.chmod.php |
---|
array
See main text for info.
changeGroup(string $setting)
$setting is the name or number of the Group to change to. If there is no setting provided, the default in Prefs is used.
string
changeMod(\octal $setting)
changeOwner(string $setting)
string
Name or number of new owner
getGroup(boolean $refreshcache) : integer
link | http://php.net/manual/en/function.clearstatcache.php |
---|
boolean
Clear the stat cache?
integer
The number of the current GroupgetOwner(boolean $refreshcache) : integer
link | http://php.net/manual/en/function.clearstatcache.php |
---|
boolean
Clear the stat cache?
integer
The number of the current OwnerloadStatInfo(boolean $refreshcache)
link | http://php.net/manual/en/function.clearstatcache.php |
---|
boolean
Call clearstatcache()?
$path : string
$stat : array