kherge / file-manager
Manages strict read and write operations.
2.7.0
2017-06-12 17:31 UTC
README
File Manager
Manages strict read and write operations for files and file streams.
Usage
use KHerGe\File\File; // Create a new file manager. $file = new File('example.txt', 'r'); // Iterate through the contents of the file. foreach ($file->iterate() as $buffer) { // ... }
Install
Add as a dependency to a Composer managed project.
composer require kherge/file-manager
Documentation
Please refer to FileInterface
for documentation.
use KHerGe\File\File; use KHerGe\File\Memory; use KHerGe\File\Stream; // Create a manager for a file. $manager = new File('example.txt', 'r'); // Create a manager for a string. $manager = new Memory('example contents', false); // Create a manager for a file stream. $manager = new Stream($stream);
License
File Manager is dual licensed under MIT and Apache 2.0.