A filesystem toolkit for PHP

0.4.5 2017-11-04 15:37 UTC

README

Latest Version Software License Build Status Coverage Status Total Downloads

A filesystem toolkit for PHP.

Why?

The classes in sndsgd\fs attempt to simplify tedious filesystem tasks.

use \sndsgd\Fs;

# lets assume `/tmp/some` doesn't exist
$path = "/tmp/some/deep/path/file.txt";

# write to a file that doesn't exist in a directory that doesn't exist
$file = Fs::getFile($path);
if ($file->write("the contents...") === false) {
   throw new Exception($file->getError());
}

Requirements

This project is unstable and subject to changes from release to release. If you intend to depend on this project, be sure to make note of and specify the version in your project's composer.json. Doing so will ensure any breaking changes do not break your project.

You need PHP >= 7.0.0 to use this library.

Install

Install sndsgd/fs using Composer.

composer require sndsgd/fs