2017 © Pedro Peláez
 

library php-filesystem

PHP classes for working with files and the file system

image

vube/php-filesystem

PHP classes for working with files and the file system

  • Thursday, April 2, 2015
  • by ross-p
  • Repository
  • 7 Watchers
  • 2 Stars
  • 8,734 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 11 Versions
  • 6 % Grown

The README.md

Vube php-filesystem

Build Status Coverage Status Latest Stable Version Dependency Status, (*1)

PHP classes for working with files and the file system, (*2)

Features

  • Safely install files on network mounted drives
  • Atomic file installs; 100% uptime on production systems
  • Atomic symlink modifications; 100% uptime on production systems

Installation

Load php-filesystem into your project by adding the following lines to your composer.json, (*3)

``` json { "require": { "vube/php-filesystem": ">=0.1" } }, (*4)



Example Usage ------------- ### Install a directory ```php // Explicitly create a directory. // ALL parent dirs we create will share mode 0775 as modified by your umask $installer = new Vube\FileSystem\Installer(); $installer->installDir('/path/to/some/dir', 0775);

Install files safely and atomically

// Install files into /existing-dir
//
// When installing into subdirs, we create all dirs needed,
// the mode is set by your umask.
//
// File installs are network-safe, providing 100% uptime
// on production systems.

$installer = new Vube\FileSystem\Installer();

$installer->installFile('file1', '/existing-dir/file1');
$installer->installFile('file2', '/existing-dir/new-dirs-we-create/with/subdirs/file2');
// Create or overwrite /path/to/symlink
//
// If it already exists, it is atomically updated.

$installer = new Vube\FileSystem\Installer();
$installer->symlink('/path/to/actual', '/path/to/symlink');

Easily diff files

// Compare file1 and file2; are they different?

$differ = new Vube\FileSystem\FileDiffer();

if($differ->isDiff('file1', 'file2'))
    echo "These files are different.\n";

Easily zip files

// Gzip source.txt and save the result in destination.gz

$zipper = new Vube\FileSystem\Gzip();
$zipper->zip('source.txt', 'destination.gz');

Dependencies

  • PHP 5.3.2+
  • Composer

The Versions

02/04 2015

dev-master

9999999-dev

PHP classes for working with files and the file system

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

filesystem file system php library vube

02/04 2015

0.2.0

0.2.0.0

PHP classes for working with files and the file system

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

filesystem file system php library vube

02/04 2015

dev-develop

dev-develop

PHP classes for working with files and the file system

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

filesystem file system php library vube

12/11 2014

0.1.5

0.1.5.0

PHP classes for working with files and the file system

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

filesystem file system php library vube

09/11 2014

0.1.4

0.1.4.0

PHP classes for working with files and the file system

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

filesystem file system php library vube

02/05 2014

0.1.3.2

0.1.3.2

PHP classes for working with files and the file system

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

filesystem file system php library vube

29/04 2014

0.1.3.1

0.1.3.1

PHP classes for working with files and the file system

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

filesystem file system php library vube

09/08 2013

0.1.3

0.1.3.0

PHP classes for working with files and the file system

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

filesystem file system php library vube

19/07 2013

0.1.2

0.1.2.0

PHP classes for working with files and the file system

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

filesystem file system php library vube

19/07 2013

0.1.1

0.1.1.0

PHP classes for working with files and the file system

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

filesystem file system php library vube

18/07 2013

0.1.0

0.1.0.0

PHP classes for working with files and the file system

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

filesystem file system php library