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

613 B

Exists

  • v::exists()

Validates files or directories.

v::exists()->validate(__FILE__); // true
v::exists()->validate(__DIR__); // true

This validator will consider SplFileInfo instances, so you can do something like:

v::exists()->validate(new \SplFileInfo($file));

See also: