PHP Classes

PHP Safe File Write: Write to files avoiding simultaneous accesses

Recommend this page to a friend!
  Info   View files Documentation   View files View files (19)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 220 All time: 8,257 This week: 107Up
Version License PHP version Categories
safe-file-operations 1.0.0GNU General Publi...5PHP 5, Files and Folders
Description 

Author

This package can write to files avoiding simultaneous accesses.

In can perform several types of operations to access files in a way that prevents file corruptions when two or more PHP scripts attempt to write to the same file.

The package provides traits that can be used by other classes to perform safe operations for file reading and writing using file locks.

Innovation Award
PHP Programming Innovation award nominee
April 2019
Number 3


Prize: One official elePHPant Plush Mascott
Many applications need to store information in files.

If several requests handled by scripts of an application attempt to change the same file at the same time, it is necessary to use locking mechanisms like file locking to prevent that multiple accesses change the same file with different information.

This package provides a trait that can be used by many different classes to change files while assuring data consistency by the means of the use of file locks.

Manuel Lemos
Picture of Michael Cummings
  Performance   Level  
Name: Michael Cummings <contact>
Classes: 9 packages by
Country: United States United States
Age: ???
All time rank: 1897263 in United States United States
Week rank: 312 Up38 in United States United States Up
Innovation award
Innovation award
Nominee: 7x

Winner: 1x

Documentation

safe-file-operations

Proves as completely safe read and write file operations as possible.


  Files folder image Files  
File Role Description
Files folder imagespecs (1 directory)
Files folder imagesrc (7 files)
Accessible without login Plain text file .coveralls.yml Data Auxiliary data
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file COPYING-LESSER.md Data Auxiliary data
Accessible without login Plain text file COPYING.md Data Auxiliary data
Accessible without login Plain text file phpspec.yml.dist Data Auxiliary data
Accessible without login Plain text file phpspec_coverage.yml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  specs  
File Role Description
Files folder imageSpec (3 files)

  Files folder image Files  /  specs  /  Spec  
File Role Description
  Plain text file ErrorHandlingTraitSpec.php Class Class source
  Plain text file MockErrorHandling.php Class Class source
  Plain text file SafeFileErrorSpec.php Class Class source

  Files folder image Files  /  src  
File Role Description
  Accessible without login Plain text file bootstrap.php Aux. Auxiliary script
  Plain text file ErrorHandlingInterface.php Class Class source
  Plain text file ErrorHandlingTrait.php Class Class source
  Plain text file SafeFile.php Class Class source
  Plain text file SafeFileError.php Class Class source
  Plain text file SafeFileHandlingTrait.php Class Class source
  Plain text file SharedFileMethodsTrait.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:220
This week:0
All time:8,257
This week:107Up