Is::path()

Checks if current input is a valid path.

Table of Contents
  1. Description
  2. Example

Description

Is::path(mixed $value, bool $exist = false): bool;

This method checks that the input provided is a valid path. This method does not validate the path and ensures that it is exists unless the $exist option is set to true.

Example

if (Is::path('.\path\to\file.txt')) {
    // …
}

Is::file()

Checks if current input is a valid file path.

Is::path()

Checks if current input is a valid path.

Is::void()

Checks for empty string, array and object.