Description


This function displays the HTML for cPanel's Disk Space Usage interface (Home >> Files >> Disk Space Usage).


We removed this function in cPanel & WHM version 54.


Examples




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$show_disk_usage = $cpanel->api1('DiskUsage', 'showmanager' , array ('2', '1', '', '1', '/mail', 'top', 'increase', '1', '0', 'trash.html', 'image/index.html', '0', '1') ); // Call the function.

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $show_disk_usage = $cpliveapi->api1('DiskUsage', 'showmanager', ['2', '1', '', '1', '/mail', 'top', 'increase', '1', '0', 'trash.html', 'image/index.html', '0', '1']); # Call the function.

 


<cpanel Module="DiskUsage::showmanager ( $FORM('level','clear','parents','sort','showtree','diskaction', 'mainaction','humanbytes','skipsmail','actionfile', 'homeimage','disable_delete','sort_direction'))">



We removed this function before we implemented function calls via the command line.


This function's HTML output varies dramatically based on the account's files and the input parameters that you pass.



Parameters

ParameterTypeDescriptionPossible valuesExample
levelinteger

The number of levels deep to display the files.

This parameter defaults to 2.

Any positive integer.

2
clearBooleanWhether to refresh the disk usage information.
  • 0 — Read the cached data.
  • 1 — Check the file system and update cached data.


If you refresh the disk usage data, the system will return a more accurate result.


1
parentsBoolean


We deprecated this parameter in cPanel & WHM version 11.


  
sortBoolean

Whether to enable sorting via the sort_direction parameter.

This value defaults to 1.

  • 0 — Disable.
  • 1 — Enable.
1
showtreestring

The directory to use as the parent directory.

This value defaults to /home.

Any valid directory.

 

/mail
diskactionstringA secondary method to specify other parameters.
  • top — Sets the level value to 1.
  • show parent — Sets the parents value to 1.
  • hide parent — Sets the parents value to 0.
  • clear — Sets the clear value to 1.
  • show small — Sets the skipsmall value to 0.
  • hide small — Sets the skipsmall value to 1.
  • as bytes — Sets the humanbytes value to 0.
  • as megabytes — Sets the humanbytes value to 1.
top
mainactionstringA secondary method to specify other parameters.
  • increaseIncrease the level value by 1.
  • moreIncrease the level value by 1.
  • decreaseDecrease the level value by 1.
  • less — Decrease the level value by 1 .
increase
humanbytesBooleanWhether to receive the file sizes in bytes or megabytes.
  • 0 — Return the file sizes in bytes.
  • 1 — Return the file sizes in megabytes.
1
skipsmailBoolean

Whether to skip files less than or equal to 8192 bytes.

This value defaults to 0.

  • 0 — Include all file sizes.
  • 1 — Skip files smaller than or equal to 8192 bytes.
0
actionfilestring

The HTML file to which the function sends file delete requests.

This value defaults to delfiles.html.

Any valid HTML file.

 

trash.html
homeimagestringThe image to use for the /home directory's icon.Any valid image, relative to the index.html file.image/index.html
disable_deleteBooleanWhether to remove the delete function from the Actions menu.
  • 0 — Do not remove.
  • 1 — Remove.
0
sort_directionBoolean

Whether to sort the files alphabetically.

This value defaults to 0.

  • 0 — Do not sort.
  • 1 — Sort.

 

1

Returns

This function returns output that varies significantly based on the account's files and the input parameters that you pass.