File::exist()

Checks if the file exists.

Table of Contents
  1. Description
  2. Example

Description

File::exist(): false|string;

This method returns the current file path if the file exists, otherwise, it returns false.

Example

$file = new File('.\path\to\file.txt');

if ($path = $file->exist()) {
    echo 'File ' . $path . ' does exist.';
}

File::exist()

Checks if the file exists.

File::size()

Gets the file sizes in human readable string format.