Download the PHP package kompas/flysystem without Composer
On this page you can find all versions of the php package kompas/flysystem. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package flysystem
Flysystem by @frankdejonge
Flysystem is a filesystem abstraction which allows you to easily swap out a local filesystem for a remote one.
Support Flysystem
Do you use Flysystem often? Supporting it through Gittip will help freeing up extra time for me to work on bugs, new features and documentation.
Goals
- Have a generic API for handling common tasks across multiple file storage engines.
- Have consistent output which you can rely on.
- Integrate well with other packages/frameworks.
- Be cacheable.
- Emulate directories in systems that support none, like AwsS3.
- Support third party plugins.
- Make it easy to test your filesystem interactions.
- Support streams for bigger file handling
Installation
Through Composer, obviously:
You can also use Flysystem without using Composer by registering an autoloader function:
Adapters
- Local
- Amazon Web Services - S3
- Rackspace Cloud Files
- Dropbox
- Ftp
- Sftp (through phpseclib)
- Zip (through ZipArchive)
- WebDAV (through SabreDAV)
- NullAdapter
Planned Adapters
- Azure
- PR's welcome?
Caching
- Memory (array caching)
- Redis (through Predis)
- Memcached
- Adapter
Local Setup
Zip Archive Setup
AWS S3 Setup
Rackspace Setup
You can also use a prefix to "namespace" your filesystem.
Dropbox Setup
FTP Setup
SFTP Setup
WebDAV Setup
NullAdapter Setup
This adapter acts like /dev/null, you can only write to it. Reading from it is never possible.
Predis Caching Setup
Memcached Caching Setup
Adapter Caching Setup
General Usage
Write Files
Update Files
Write or Update Files
Read Files
Check if a file exists
Delete Files
Rename Files
Get Mimetypes
Get Timestamps
Get File Sizes
Create Directories
Directories are also made implicitly when writing to a deeper path
Delete Directories
Manage Visibility
Visibility is the abstraction of file permissions across multiple platforms. Visibility can be either public or private.
You can also change and check visibility of existing files
Global visibility setting
You can set the visibility as a default, which prevents you from setting it all over the place.
List Contents
The result of a contents listing is a collection of arrays containing all the metadata the file manager knows at that time. By default a you'll receive path info and file type. Additional info could be supplied by default depending on the adapter used.
Example:
By default Flysystem lists the top directory non-recursively. You can supply a directory name and recursive boolean to get more precise results
List paths
List with ensured presence of specific metadata
Get file into with explicit metadata
Using streams for reads and writes
S3 and writeStream
In order to get the correct mime type for the object, supply it like so:
Plugins
Need a feature which is not included in Flysystem's bag of tricks? Write a plugin!
Now we're ready to use the plugin
Mount Manager
Flysystem comes with an wrapper class to easily work with multiple filesystem instances
from a single object. The Flysystem\MountManager
is an easy to use container allowing
you do simplify complex cross-filesystem interactions.
Setting up a Mount Manager is easy:
Now we do all the file operations we'd normally do on a Flysystem\Filesystem
instance.
This makes it easy to code up simple sync strategies.
Enjoy.
Oh and if you've come down this far, you might as well follow me on twitter.