2017 © Pedro Peláez
 

library temporary-filesystem

Symfony filesystem extension to handle temporary files

image

neutron/temporary-filesystem

Symfony filesystem extension to handle temporary files

  • Wednesday, February 7, 2018
  • by romain
  • Repository
  • 3 Watchers
  • 28 Stars
  • 1,161,167 Installations
  • PHP
  • 15 Dependents
  • 0 Suggesters
  • 11 Forks
  • 3 Open issues
  • 8 Versions
  • 10 % Grown

The README.md

TemporaryFilesystem

TemporaryFilesystem propose an API for temprary filesystem based on Symfony Filesystem Component., (*1)

Build Status, (*2)

Usage

use Neutron\TemporaryFilesystem\TemporaryFilesystem;

$fs = TemporaryFilesystem::create();

API Examples :

CreateTemporaryDirectory

CreateTemporaryDirectory creates a temporary directory with an optional mode :, (*3)

$tempDir = $fs->createTemporaryDirectory($mode = 0755);

CreateTemporaryFile

CreateTemporaryFile creates an empty files in the temporary folder:, (*4)

$fs->createTemporaryFile();

// return an empty temporary files with a "thumb-"
// prefix, '.dcm' as suffix and 'jpg' as extension
$fs->createTemporaryFile('thumb-', '.dcm', 'jpg');

CreateTemporaryFiles

CreateTemporaryFiles creates a set of empty files in the temporary folder:, (*5)

// return an array of 5 path to temporary files
$fs->createTemporaryFiles(5);

// return an array of 5 path to empty temporary files with a "thumb-"
// prefix, '.dcm' as suffix and 'jpg' as extension
$fs->createTemporaryFiles(20, 'thumb-', '.dcm', 'jpg');

This method is useful when dealing with libraries which encode images depending on the filename extension., (*6)

CreateEmptyFile

CreateEmptyFile creates an empty file in the specified folder:, (*7)

// return a path to an empty file inside the current working directory
$fs->createEmptyFile(getcwd());

// return a path to an empty file in the "/home/romain" directory. The file
// has "original." as prefix, ".raw" as suffix and "CR2" as extension.
$fs->createEmptyFile("/home/romain", 'original.', '.raw', 'CR2');

This method is particularly useful when dealing with concurrent process writing in the same directory., (*8)

License

Released under the MIT license, (*9)

The Versions

07/02 2018

dev-master

9999999-dev

Symfony filesystem extension to handle temporary files

  Sources   Download

MIT

The Requires

 

The Development Requires

07/02 2018

2.3.0

2.3.0.0

Symfony filesystem extension to handle temporary files

  Sources   Download

MIT

The Requires

 

The Development Requires

05/03 2016

2.2.0

2.2.0.0

Symfony filesystem extension to handle temporary files

  Sources   Download

MIT

The Requires

 

The Development Requires

10/10 2013

2.1.1

2.1.1.0

Symfony filesystem extension to handle temporary files

  Sources   Download

MIT

The Requires

 

The Development Requires

10/10 2013

2.0.2

2.0.2.0

Symfony filesystem extension to handle temporary files

  Sources   Download

MIT

The Requires

 

06/08 2013

2.1.0

2.1.0.0

Symfony filesystem extension to handle temporary files

  Sources   Download

MIT

The Requires

 

The Development Requires

09/04 2013

2.0.1

2.0.1.0

Symfony filesystem extension to handle temporary files

  Sources   Download

MIT

The Requires

 

02/11 2012

1.0.0

1.0.0.0

Symfony filesystem extension to handle temporary files

  Sources   Download

MIT

The Requires