Directory
Directory()
Validates if the given path is a directory.
v::directory()->validate(__DIR__); // true
v::directory()->validate(__FILE__); // false
This validator will consider SplFileInfo instances, so you can do something like:
v::directory()->validate(new SplFileInfo('library/'));
v::directory()->validate(dir('/'));
Categorization
- File system
Changelog
Version | Description |
---|---|
2.0.0 | Validates PHP's Directory class |
0.4.4 | Created |
See also: