Path Prefixing Adapter Decorator
Any filesystem adapter can be scoped down to a prefixed path
using the League\Flysystem\PathPrefixing\PathPrefixedAdapter
.
Installation:
composer require league/flysystem-path-prefixing:^3.3
Usage:
// The internal adapter, any
$adapter = new League\Flysystem\InMemory\InMemoryFilesystemAdapter();
// Turn it into a path-prefixed adapter
$adapter = new League\Flysystem\PathPrefixng\PathPrefixedAdapter($adapter, 'a/path/prefix');
// Instantiate the filesystem
$filesystem = new League\Flysystem\Filesystem($adapter);