Provide simple api to read and write files

0.1.0 2015-03-18 15:55 UTC

This package is auto-updated.

Last update: 2024-10-15 19:49:07 UTC


README

This provide a simple api to read and write files

Build Status Latest Stable Version Total Downloads

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.