This package is abandoned and no longer maintained. The author suggests using the league/flysystem-memory package instead.
An in-memory adapter for Flysystem.
This adapter keeps a filesystem in memory. It should be useful for tests, allowing you to have a working filesystem without having to clean up after each test run.
composer require twistor/flysystem-memory-adapter
use League\Flysystem\Filesystem; use Twistor\Flysystem\MemoryAdapter; $filesystem = new Filesystem(new MemoryAdapter()); $filesystem->write('new_file.txt', 'yay a new text file!'); $contents = $filesystem->read('new_file.txt'); // If you have existing test files, you can populate the memory adapter from a // filesystem path. $adapter = MemoryAdapter::createFromPath('path/to/some/folder'); // Or, you can use an existing filesystem, and convert it. $adapter = MemoryAdapter::createFromFilesystem($filesystem);