jstewmc / validate-file-size
Validate a file's size
v0.1.0
2016-08-26 03:10 UTC
Requires
- php: ^7.0
Requires (Dev)
- jstewmc/test-case: ^1.0
- mikey179/vfsstream: ^1.6
This package is auto-updated.
Last update: 2024-10-29 05:28:17 UTC
README
Validate a file's size.
use Jstewmc\ValidateFileSize\Validate; // set the file's name $filename = '/path/to/foo.php'; // create a three-byte file file_put_contents($filename, 'foo'); // check the file's size (new Validate(0, 1))($filename); // returns false (new Validate(0, 999))($filename); // returns true
Keep in mind, the min and max sizes are inclusive.
That's about it!
Author
License
Version
0.1.0, August 24, 2017
- Initial release