Download the PHP package tobento/service-filesystem without Composer
On this page you can find all versions of the php package tobento/service-filesystem. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tobento/service-filesystem
More information about tobento/service-filesystem
Files in tobento/service-filesystem
Package service-filesystem
Short Description Provides abstraction layers for dealing with directories and files.
License MIT
Homepage https://www.tobento.ch
Informations about the package service-filesystem
Filesystem Service
The Filesystem Service provides abstraction layers for dealing with directories and files.
Table of Contents
- Getting started
- Requirements
- Highlights
- Documentation
- Files
- File
- Json File
- Pdf File
- Dir
- File Formats
- Files
- Credits
Getting started
Add the latest version of the Filesystem service project running this command.
Requirements
- PHP 8.0 or greater
Highlights
- Framework-agnostic, will work with any project
- Decoupled design
Documentation
Files
Dealing with different files.
File
Check if it is a file:
Check for specific file extension:
File information:
File name manipulation:
These methods return always an new instance.
File copy, move, rename and delete operations:
These methods return a new instance on success, otherwise null, except for delete operation.
Check if file is within a specified directory:
File responses
Json File
Providing the following additional methods.
Pdf File
Providing the following additional methods.
Dir
Dir information.
Get files from a directory
Get folders from a directory
Create or rename a directory
Copy a directory
This will copy subfolders and all files too.
Delete directories or file
A note on ignoring files
:warning: If the given format is not added by the addFormat() method, see File Formats below for detail, files will only be checked by its extension and not by its mime type.
The formats added by default are:
File Formats
The FileFormatsInterface has the following methods:
Add a format
Merge formats
Get Format
Get Formats
Get Mime Type
Get Mime Types
Credits
- Tobias Strub
- All Contributors