-
Notifications
You must be signed in to change notification settings - Fork 2
FileSystem
Pieter Hordijk edited this page Dec 31, 2018
·
1 revision
Validates the input (string
) to be a valid directory.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\FileSystem\Directory;
(new Directory())->validate('/path/to/a/directory');
-
Type.String
when the validated value is not a string -
FileSystem.Directory
when the directory does not exists
Validates the input (string
) to be a valid path.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\FileSystem\Exists;
(new Exists())->validate('/path/to');
-
Type.String
when the validated value is not a string -
FileSystem.Exists
when the path is valid
Validates the input (string
) to be a valid file.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\FileSystem\File;
(new File())->validate('/path/to/a/file.txt');
-
Type.String
when the validated value is not a string -
FileSystem.File
when the file does not exists