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!
- Initial release