respect-validation/docs/rules/Exists.md
Henrique Moody a009286ba6
Update "See also" section in the rules's documentation
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2018-12-11 13:19:52 +01:00

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: