https://github.com/marutypes/mile
Simple file manipulatrion library for php
https://github.com/marutypes/mile
Last synced: 2 months ago
JSON representation
Simple file manipulatrion library for php
- Host: GitHub
- URL: https://github.com/marutypes/mile
- Owner: marutypes
- Created: 2014-07-28T19:59:04.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-06T23:36:28.000Z (over 10 years ago)
- Last Synced: 2024-04-14T05:51:26.211Z (about 1 year ago)
- Language: PHP
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### 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](http://www.dbad-license.org/)