Description
This function lists FTP users and their home directory's disk information.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
Ftp::list_ftp_with_disk
— This function lists FTP account and disk usage information.
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 |
dirhtml |
string |
A string to prepend to the dir return variable. |
A valid string. |
example.com/ |
include_acct_types |
string |
The types of account to view. |
Note: Separate multiple types with the pipe (|) character. |
main
|
skip_acct_types |
string |
The types of account to exclude. |
Note: Separate multiple types with the pipe (|) character. |
main
|
Returns
Return |
Type |
Description |
Possible values |
Example |
diskquota |
string |
The account's disk quota, in Megabytes (MB). |
A positive integer value, or unlimited. |
unlimited |
diskusedpercent |
integer |
The percentage of space that the account uses. |
A positive integer value. |
0 |
diskused |
integer |
The amount of space that the account uses, in Megabytes (MB). |
A positive integer value. |
0 |
humandiskquota |
string |
The amount of space that the account may use in a human-readable format, in Megabytes (MB). |
|
None |
accttype |
string |
The type of FTP account. |
|
sub |
reldir |
string |
The relative path to the FTP user's document root. |
A valid relative path. |
public_html/user |
_diskused |
integer |
The amount of space that the account uses, in bytes. |
A positive integer value. |
0 |
login |
string |
The FTP account's username. |
A valid username. |
user |
dir |
string |
The path to the FTP user's document root. |
A valid absolute path. |
/home/example/public_html/user |
deleteable |
boolean |
Whether you can delete the account. |
|
1 |
serverlogin |
string |
The full FTP login name. |
A username, at symbol (@), and the domain name |
user@example.com |
htmldir |
string |
|
|
null |
humandiskused |
string |
The amount of space that the account uses in a human-readable format, in Megabytes (MB). |
|
None |
diskusedpercent20 |
integer |
The percentage of space that the account uses. |
A positive integer value. |
0 |
_diskquota |
integer |
The amount of space that the account may use, in bytes. |
A positive integer value. |
0 |
reason |
string |
A reason for failure. Note: This function only returns a reasonvalue if it failed. |
A string that describes the error. |
This is an error message. |
result |
boolean |
Whether the function succeeded. |
|
1 |