Awesome
File
This provide a simple api to read and write files
Installation
With Composer
It is best installed it through packagist
by including desarrolla2/file
in your project composer.json require:
"require": {
// ...
"desarrolla2/file": "*"
}
Without Composer
You can also download it from [Github] (https://github.com/desarrolla2/File), but no autoloader is provided so you'll need to register it with your own PSR-4 compatible autoloader.
Usage
<?php
require __DIR__ . '/../vendor/autoload.php';
use Desarrolla2\File\File;
// Simple api to write file
File::write($fileName,$data);
// Simple api to read file
File::read($fileName);
Formats
Current supported formats are:
- File: raw data
- Json: encode arrays to json files.
Contact
You can contact with me on @desarrolla2.