Description
This function queries files and directories.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
Fileman::autocompletedir
— 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
Parameter |
Type |
Description |
Possible values |
Example |
dirsonly |
Boolean |
Whether to only return directories. This parameter defaults to 0. |
|
1 |
path |
string |
The path to the directory to query. This parameter defaults to the user's /home directory. |
The absolute path to a location on the server. |
/home/user/public_html |
Returns
Return |
Type |
Description |
Possible values |
Example |
file |
string |
The queried filename or path. |
The path input parameter's value. |
public_html |
reason |
string |
A reason for failure. Note: This function only returns a reason value if there was an error. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |