ak1r0 / flysystem-filepathstrategy
Add a 'File path strategy' to Flysystem. Allow to set globaly how files must be stored.
Installs: 3
Dependents: 0
Suggesters: 1
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ak1r0/flysystem-filepathstrategy
Requires
- php: ^5.4
- league/flysystem: ^1.0
This package is auto-updated.
Last update: 2025-09-23 09:50:44 UTC
README
Add a "File path strategy" to Flysystem. Allow to set globaly how files must be stored.
This is usefull to have the same archive/backup strategy whatever adapter you use.
Todos
- Units tests
- PHP 7 version
Install
composer require ak1r0/flysystem-filepathstrategy
Usage
$adapter = new \League\Flysystem\Adapter\Local(); $config = new \League\Flysystem\Config(); $strategy = new \Ak1r0\Flysystem\FilePathStrategy\YearMonthDayStrategy(); $filesystem = new \Ak1r0\Flysystem\Filesystem($adapter, $config, $strategy); // and then, basic usage. // For every 'write' method it will automatically add current "/year/month/day/" before your path