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

32 lines
613 B
Markdown
Raw Normal View History

2022-08-29 20:14:13 +02:00
# Exists
- `v::exists()`
Validates files or directories.
```php
v::exists()->validate(__FILE__); // true
v::exists()->validate(__DIR__); // true
```
This validator will consider SplFileInfo instances, so you can do something like:
```php
v::exists()->validate(new \SplFileInfo($file));
```
***
See also:
* [Directory](Directory.md)
* [Executable](Executable.md)
* [Extension](Extension.md)
* [File](File.md)
* [Image](Image.md)
* [Mimetype](Mimetype.md)
* [Readable](Readable.md)
* [Size](Size.md)
* [SymbolicLink](SymbolicLink.md)
* [Uploaded](Uploaded.md)
* [Writable](Writable.md)