Skip to content

marutypes/Mile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mile

A simple library for file manipulation in php.

Mile is super duper WIP.

It's purpose is to let you do basic file operations with minimal worry.

Example

Let's say you need to create or overwrite a static file in an atomic operation (ie. Other processes need to be safe to open the file without accidentally doing so in the middle of the change). You'd do this like so:

mile = new \themallen\mile\Mile()->put('some/path','some data');

Functions

  • put - put('a/path/to/something','some blob of text'); Mile writes to a temporary file and then uses rename as it is an atomic operation. If rename fails (on some windows hosts it will), it falls back to copy->unlink.

License

Don't be a dick

About

Simple file manipulatrion library for php

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages