Flysystem can be installed using composer.
composer require league/flysystem:^3.0
Additionally, you may want to install an extra adapter to interact with specific types of filesystems. You can find the adapters in the menu.
To safely interact with the filesystem, always wrap the adapter
Filesystem instance. You can read more about why in the
information about the architecture.
// SETUP $adapter = new League\Flysystem\Local\LocalFilesystemAdapter($rootPath); $filesystem = new League\Flysystem\Filesystem($adapter); // USAGE $filesystem->write($path, $contents);