File::route()

Returns the file’s relative path.

Table of Contents
  1. Description
  2. Example

Description

File::route(): ?string;

This method returns the file’s path relative to the PATH constant value.

Example

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

echo $file->route(); // Returns `'/path/to/file.txt'`

File::route()

Returns the file’s relative path.

File::size()

Gets the file sizes in human readable string format.