Description
This function lists a directory's files, permissions, and some display options.
Warning:
- UAPI (recommended)
Fileman::get_file_information
— This function returns the information for a specified file or directory.Fileman::list_files
— This function returns a sorted list of files and directories.
- cPanel API 2 —
Fileman::listfiles
— This function lists a directory's files and their attributes.
Examples
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
dir |
string |
The files' directory. This value defaults to /home. |
Any valid directory. |
/user |
chooser |
Boolean |
Required Whether to print extra links to upload files, and create files and new folders. |
|
1 |
select |
string |
The file's arguments to link to a specified HTML page. This value defaults to select.html. |
Any valid filename. |
select.html |
dirselect |
string |
Required The HTML page to which to send the specified files' arguments. |
Any valid HTML page name. |
seldir.html |
usesameframe |
Boolean |
Required Whether to create links that open selected files in a new browser window. |
|
1 |
Returns
This function returns the specified directory's files, permissions, and display options in HTML format.