Description
This function returns any files and directories that begin with a specified string.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameters |
Type |
Description |
Possible values |
Example |
path |
string |
Required The prefix of the paths to complete. |
A valid string. |
public |
dirsonly |
string |
Whether to include only directories in the output. This value defaults to 0. |
|
1 |
list_all |
string |
Whether to return all files and directories inside the specified directory. If you set this parameter's value to 1, you must set thepath parameter's value to a full directory path. This value defaults to 0. |
|
0 |
Returns
Return |
Type |
Description |
Possible values |
Example |
|
array of hashes |
An array of hashes that contains the files and directories that match the specified path. |
This array of hashes includes the file return. |
|
file |
string |
A file or directory that matches the specified path. The function returns this value in the unnamed array of hashes. |
A valid filename or directory name. |
public_ftp |