O2System Filesystem is an Open Source PHP Convenience Library for reading, writing and appending data from and into files and directories, which is built for working more powerfully with O2System Framework, but it also can be used with other frameworks as a standalone version with limited features.
- CSV File
- INI File
- JSON File
- XML File
- Zip File
- File Handler and Manipulation
- Directory Handler and Manipulation
- Uploaders
- Downloaders with speed limit and resumeable support
- File Transfer Protocol (FTP)
The best way to install O2System Filesystem is to use Composer
composer require o2system/filesystem
Packagist: https://packagist.org/packages/o2system/filesystem
use O2System\Filesystem\Files;
// Write a CSV file example
$csvFile = new Files\CsvFile();
$csvFile->createFile( 'path/to/files/filename.csv' );
$csvFile->store( 'foo', 'bar' );
$csvFile->writeFile();
// File download handler
$downloader = new Handlers\Downloader( 'path/to/files/downloadthis.zip' );
$downloader
->speedLimit( 1024 )
->resumeable( true );
// Send the requested download file
$downloader->download();
Documentation is available on this repository wiki or visit this repository github page.
Please kindly mail us at hello@o2system.id
Please kindly submit your issues at Github so we can track all the issues along development and send a pull request to this repository.
- PHP 7.2+ with FileInfo (finfo) extension
- Composer
- O2System Kernel