dev-master
9999999-devA library to upload files
Apache-2.0
The Requires
Wallogit.com
2017 © Pedro Peláez
A library to upload files
This is a simple library to manipulate some files. For now we can do things like..., (*1)
$file = new TMPHPFile('path/to/file.txt');
$file->increments("\n Hello new line!");
...to increments a line in one file., (*2)
Or you can do too, a simple function to verify if a file was be modified:, (*3)
$file = new TMPHPFile('path/to/file.txt');
$modifiedAt = $file->getMTime();
if($modifiedAt > $timeForDatabase) {
// then do it
}
Or yet, you can compare two files modified., (*4)
$original = new TMPHPFile('path/to/original.txt');
$cached = new TMPHPFile('path/to/cached.txt');
if($original->modified()->isGreaterThan($cached)) {
// cache the original again, cause he is old!
}
Well, it's all for now., (*5)
All methods will be describe after., (*6)
You can send us a pull request, or send a issue too., (*7)
A library to upload files
Apache-2.0