okapi / filesystem
PHP Filesystem is a PHP library that provides an abstraction layer for the filesystem.
Installs: 4 446
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- php: >=8.0
Requires (Dev)
- jetbrains/phpstorm-attributes: ^1.0
- phpunit/phpunit: >=9.0
This package is auto-updated.
Last update: 2024-12-18 18:31:23 UTC
README
PHP Path
PHP Filesystem is a PHP library that provides an abstraction layer for the filesystem.
It is based on Node.js's filesystem module.
Installation
composer require okapi/filesystem
Usage
<?php use Okapi\Filesystem\Filesystem; // Write file Filesystem::writeFile('./path/to/file.txt', 'Hello World!'); // Read file $contents = Filesystem::readFile('./path/to/file.txt'); // Remove directory or file Filesystem::rm( './path', recursive: true, force: true, ); // Create directory Filesystem::mkdir( './path/to/directory', recursive: true, mode: 0777, );
Testing
- Run
composer run-script test
or - Run
composer run-script test-coverage
Show your support
Give a ⭐ if this project helped you!
📝 License
Copyright © 2023 Valentin Wotschel.
This project is MIT licensed.