Download the PHP package tobento/service-file-storage without Composer
On this page you can find all versions of the php package tobento/service-file-storage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package service-file-storage
File Storage Service
File storage interface for PHP applications using Flysystem as default implementation.
Table of Contents
- Getting started
- Requirements
- Highlights
- Documentation
- Create Storage
- File
- Write File
- File Exists
- Retrieve File
- Retrieve Files
- Delete File
- Move File
- Copy File
- Available File Attributes
- Folder
- Create Folder
- Folder Exists
- Retrieve Folders
- Delete Folder
- Visibility
- Set Visibility
- Storages
- Create Storages
- Add Storages
- Get Storage
- Default Storages
- Available Storages
- Flysystem Storage
- Null Storage
- Read Only Storage Adapter
- Interfaces
- Storage Factory Interface
- Storage Interface
- Storages Interfaces
- File Interface
- Files Interface
- Folder Interface
- Folders Interface
- Credits
Getting started
Add the latest version of the file storage service project running this command.
Requirements
- PHP 8.0 or greater
Highlights
- Framework-agnostic, will work with any project
- Decoupled design
Documentation
Create Storage
Check out the Available Storages section to create storages.
File
Write File
supported content
- any object implementing
File Exists
Returns if file exists, otherwise .
Retrieve File
Use the with method to retrieve specific file attributes. Check out the Available File Attributes for more detail.
Check out the File Interface to learn more about it.
Retrieve Files
Use the with method to retrieve specific file attributes. Check out the Available File Attributes for more detail.
Check out the Files Interface to learn more about it.
Delete File
Move File
Copy File
Available File Attributes
Check out the File Interface to learn more about it.
Folder
Create Folder
Folder Exists
Returns if folder exists, otherwise .
Retrieve Folders
Check out the Folders Interface to learn more about it.
Delete Folder
Deleting a folder will delete the specified folder and all of its files.
Visibility
Set Visibility
Storages
Create Storages
Add Storages
add
register
You may use the register method to only create the storage if requested.
Get Storage
If the storage does not exist or could not get created it throws a StorageException.
You may use the method to check if a storage exists.
Default Storages
You may add default storages for your application design.
Available Storages
Flysystem Storage
Check out the League Flysystem to learn more about it.
Null Storage
Read Only Storage Adapter
Any storage implementing the can be made read-only by decorating them using the :
Interfaces
Storage Factory Interface
You may use the storage factory interface for creating storages.
Storage Interface
All methods from:
- File
- Folder
- Visibility
name
Returns the storage name.
Storages Interface
All methods from:
- Add Storages
- Get Storage
- Default Storages
File Interface
Methods
Files Interface
filter
Returns a new instance with the filtered files.
sort
Returns a new instance with the files sorted.
all
Returns all files.
Folder Interface
Methods
Folders Interface
filter
Returns a new instance with the filtered folders.
sort
Returns a new instance with the folders sorted.
first
Returns the first folder or null if none.
get
Returns the folder by path or null if not exists.
all
Returns all folders.
Credits
- Tobias Strub
- All Contributors
- League Flysystem
All versions of service-file-storage with dependencies
psr/http-factory Version ^1.0
psr/http-message Version ^1.0
tobento/service-iterable Version ^1.0
tobento/service-filesystem Version ^1.0
league/flysystem Version ^3.0