
Flysystem
A PHP library that gives one file API for local disks, cloud storage and other filesystems.
- Stars
- 13.6k
- Forks
- 867
- Licence
- MIT
- Language
- PHP
- Last update
- 1 months ago
- Type
- Library
What it is
Flysystem is a file storage library for PHP. It offers one set of methods for reading and writing files, whether they live on the local disk, an FTP or SFTP server, or a cloud service such as AWS S3 or Google Cloud Storage. Developers use it so their code does not depend on one storage vendor, and they can switch storage with less rewriting.
- Store uploaded user files on local disk in development and on S3 in production using the same code
- Read and write files on an SFTP or FTP server through the same interface
- Keep files in an in-memory adapter during automated tests
- Build a custom storage backend by writing a new adapter
Great for
- PHP developers who need to store files in more than one place
- Teams that want to avoid lock-in to a single cloud storage provider
- Projects that may move from local storage to S3 or similar later
Not ideal for
- Non-PHP projects, since the library is written for PHP
- People who only need a simple local file read/write and nothing else, where PHP's built-in functions are enough
- Users looking for an end-user app; this is a code library, not a program with a interface
How to get it
- 1
Install with a package manager
You'll need: PHP 8.0.2 or newer (per README badge) · Composer
Install via Composer
composer require league/flysystem - 2
Run it
- Install the library with Composer.
- Create an adapter for your storage, such as the Local adapter.
- Create a Filesystem object using that adapter.
- Call read, write or delete methods on the Filesystem object.
- 3
Get the most out of it
- Read the official docs for the adapter you need, such as S3 or SFTP
- Check the 'New in V3' guide if you are coming from an older version
- Use the Memory adapter in tests to avoid touching real storage
- Add a third-party adapter from the README list for services like Dropbox or Azure Blob Storage
Downloads
Strengths
- One consistent interface across many storage types, per the README
- Officially supported adapters include Local, FTP, SFTP, Memory, AWS S3, Google Cloud Storage, WebDAV and ZipArchive
- Released under the MIT license
Trade-offs
- You still need to write PHP code to use it; there is no ready-made app
- Third-party adapters are maintained separately and vary in quality and support
- The README is short and details live on the external documentation site
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| flysystem (this) | 13.6k | Library | intermediate | 1 months ago | PHP developers who need to store files in more than one place |
| guzzle | 23.4k | Library | intermediate | 11 days ago | PHP developers who need to call external REST or web service APIs |
| monolog | 21.4k | Library | intermediate | 5 days ago | PHP developers who need structured logs from an application |
| uuid | 12.6k | Library | beginner | 2 months ago | PHP developers who need unique IDs for database records or API objects |
| EmailValidator | 11.6k | Library | beginner | 4 days ago | PHP developers adding email checks to sign-up or contact forms |
| workerman | 11.5k | Library | intermediate | 13 days ago | PHP developers who need a long-running socket or WebSocket server |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.