Skip to content

gisostallenberg/file-permission-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latest Stable Version Latest Unstable Version License Total Downloads Travis

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------

About

Library to convert file permissions from various formats to another

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages