gisostallenberg / file-permission-calculator
Library to convert file permissions from various formats to another
Installs: 23 184
Dependents: 4
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 2
Requires (Dev)
- phpunit/phpunit: ^4.8 || ^5.4
This package is auto-updated.
Last update: 2024-10-24 04:34:38 UTC
README
File Permission Calculator
Library to convert file permissions from various formats to another
Installation
composer require gisostallenberg/file-permission-calculator
Usage examples
use GisoStallenberg\FilePermissionCalculator\FilePermissionCalculator; echo new FilePermissionCalculator(0100700); // -rwx------ echo new FilePermissionCalculator(0700); // urwx------ echo FilePermissionCalculator::fromStringRepresentation('-rw-r--r--')->getMode(); // 33188 echo FilePermissionCalculator::fromStringRepresentation('-rw-r--r--')->getOctalString(); // 100644 echo FilePermissionCalculator::fromStringRepresentation('-rw-r--r--'); // -rw-r--r-- echo FilePermissionCalculator::fromOctalString('0100700'); // -rwx------