emgag / flysystem-tempdir
Flysystem adapter for a self-destroying temporary directory
Installs: 70 932
Dependents: 5
Suggesters: 1
Security: 0
Stars: 10
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: ^7.4 || ^8.0 || ^8.1
- league/flysystem: ^2.0.0 || ^3.0.0
Requires (Dev)
- phpstan/phpstan: ^1.7
- phpunit/phpunit: ^9.5
- rector/rector: ^0.13.3
README
An adapter for the Flysystem file system abstraction library which creates a temporary directory on local filesystem and which is automatically removed again on object destruct.
Installation
composer require emgag/flysystem-tempdir
Usage
As League\Flysystem\Filesystem wrapper:
use Emgag\Flysystem\Tempdir; $fs = new Tempdir($prefix = '', $tempdir = null, $destruct = true); // fully qualified FS path $fsPath = $fs->getPath();
or as Flysystem Adapter:
use Emgag\Flysystem\TempdirAdapter; use League\Flysystem\Filesystem; $adapter = new TempdirAdapter($prefix = '', $tempdir = null, $destruct = true); $filesystem = new Filesystem($adapter); // fully qualified FS path $fsPath = $adapter->getPath();
License
flysystem-tempdir is licensed under the MIT License.