Filesystem::files()

array files(string $directory) Get an array of all files in a directory. Parameters string $directory Return Value array

Filesystem::files()

array files(string|null $directory = null, bool $recursive = false) Get an array of all files in a directory. Parameters string|null $directory bool $recursive Return Value array

Filesystem::extension()

string extension(string $path) Extract the file extension from a file path. Parameters string $path Return Value string

Filesystem::exists()

bool exists(string $path) Determine if a file or directory exists. Parameters string $path Return Value bool

Filesystem::exists()

bool exists(string $path) Determine if a file exists. Parameters string $path Return Value bool

Filesystem::dirname()

string dirname(string $path) Extract the parent directory from a file path. Parameters string $path Return Value string

Filesystem::directories()

array directories(string $directory) Get all of the directories within a given directory. Parameters string $directory Return Value array

Filesystem::directories()

array directories(string|null $directory = null, bool $recursive = false) Get all of the directories within a given directory. Parameters string|null $directory bool $recursive Return Value array

Filesystem::deleteDirectory()

bool deleteDirectory(string $directory, bool $preserve = false) Recursively delete a directory. The directory itself may be optionally preserved. Parameters string $directory bool $preserve Return Value bool

Filesystem::deleteDirectory()

bool deleteDirectory(string $directory) Recursively delete a directory. Parameters string $directory Return Value bool