sndsgd / fs
A filesystem toolkit for PHP
Installs: 3 858
Dependents: 4
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 1
Open Issues: 0
Requires
- php: >=7.0.0
- sndsgd/util: >=1.1.0
Requires (Dev)
- mikey179/vfsstream: 1.6.4
- php-mock/php-mock-phpunit: ^1.1
- phpunit/phpunit: ~5
- satooshi/php-coveralls: ~1.0
README
A filesystem toolkit for PHP.
Why?
The classes in sndsgd\fs
attempt to simplify tedious filesystem tasks.
use \sndsgd\Fs; # lets assume `/tmp/some` doesn't exist $path = "/tmp/some/deep/path/file.txt"; # write to a file that doesn't exist in a directory that doesn't exist $file = Fs::getFile($path); if ($file->write("the contents...") === false) { throw new Exception($file->getError()); }
Requirements
This project is unstable and subject to changes from release to release. If you intend to depend on this project, be sure to make note of and specify the version in your project's composer.json
. Doing so will ensure any breaking changes do not break your project.
You need PHP >= 7.0.0 to use this library.
Install
Install sndsgd/fs
using Composer.
composer require sndsgd/fs