$include_path (bool) – Whether to include the path as part of the filenames

Returns:

An array of file names

Return type:

array

Takes a server path as input and returns an array containing the names of all files
contained within it. The file path can optionally be added to the file names by setting
the second parameter to TRUE.

$top_level_only (bool) – Whether to look only at the specified directory (excluding sub-directories)

Returns:

An array containing info on the supplied directory’s contents

Return type:

array

Reads the specified directory and builds an array containing the filenames, filesize,
dates, and permissions. Sub-folders contained within the specified path are only read
if forced by sending the second parameter to FALSE, as this can be an intensive
operation.

Given a file and path, returns (optionally) the name, path, size and date modified
information attributes for a file. Second parameter allows you to explicitly declare what
information you want returned.