tinect / flysystem-garbage
Flysystem Adapter to move files into garbage folder when specific actions are taken
Installs: 8 630
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- league/flysystem: ^3.10.0
Requires (Dev)
- infection/infection: ^0.27.0
- league/flysystem-adapter-test-utilities: ^3.10.0
- league/flysystem-memory: ^3.10.0
- phpstan/phpstan: ^1.10
- phpunit/phpunit: @stable
README
This is a Flysystem Adapter to move files into garbage folder when specific actions are taken
Installation
composer require tinect/flysystem-garbage
Usage example
<?php declare(strict_types=1); use League\Flysystem\Filesystem; use League\Flysystem\Config; use League\Flysystem\Local\LocalFilesystemAdapter; use Tinect\Flysystem\Garbage\GarbageAdapter; //Initialize your adapter $adapter = new LocalFilesystemAdapter( '/my/path/' ); //Put your adapter into the garbageAdapter $adapter = new GarbageAdapter( $adapter ); //Perform your actions as usual $adapter->write('test.txt', 'content', new Config()); $adapter->delete('test.txt'); //see directory "garbage"