tao-test/app/vendor/respect/validation/docs/rules/Directory.md

619 B

Directory

  • v::directory()

Validates directories.

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($directory));

See also: