Download the PHP package mathiasreker/php-chmod without Composer
On this page you can find all versions of the php package mathiasreker/php-chmod. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mathiasreker/php-chmod
More information about mathiasreker/php-chmod
Files in mathiasreker/php-chmod
Package php-chmod
Short Description php-chmod is a PHP library for easily changing file/directory permissions recursively.
License MIT
Homepage https://github.com/mathiasreker/php-chmod
Informations about the package php-chmod
PHP chmod
php-chmod is a PHP library for easily changing file/directory permissions recursively.
✅ Literal octal notation (0o) is supported
Versions & Dependencies
| Version | PHP | Documentation |
|---|---|---|
| ^3.0 | ^8.1 | current |
Requirements
- php-extension
ext-mbstring
Installation
Run:
Examples
Dry run:
Fix:
Documentation
setDefaultFileMode sets the default file permission:
setDefaultDirectoryMode sets the default directory permission:
setExcludedFileModes sets the allowed permissions for files. Files with these permissions will be skipped:
setExcludedDirectoryModes sets the allowed permissions for directories. Directories with these permissions will be
skipped:
setExcludedNames exclude files by a custom pattern. Glob and RegEx are supported:
setNames includes files by a custom pattern and exclude any other files. Glob and RegEx are supported:
setExcludedPaths excludes a list of file/directory paths:
doExcludeFiles excludes all files:
doExcludeDirectories excludes all directories:
scan finds all the concerned files/directories:
setPaths sets paths of files/directories manually. This is an alternative to the scanner if you want to use a custom
scanner:
dryRun returns an array of the concerned files/directories:
fix changes the concerned files/directories permissions to the default permission:
Roadmap
See the open issues for a complete list of proposed features (and known issues).
Contributing
If you have a suggestion to improve this, please fork the repo and create a pull request. You can also open an issue with the tag "enhancement". Finally, don't forget to give the project a star! Thanks again!
Docker
If you are using docker, you can use the following command to get started:
Next, access the container:
Tools
PHP Coding Standards Fixer:
PHP Coding Standards Checker:
PHP Stan:
Unit tests:
License
It is distributed under the MIT License. See LICENSE for more information.