PHP code example of o2system / filesystem
1. Go to this page and download the library: Download o2system/filesystem library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
o2system / filesystem example snippets
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();