Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation



integrationblogcta.jpg

DiskUsage Module Documentation

Provides the ability to view DiskUsage information

The functions within this module may or may not be governed by a feature list. The required feature list may vary from function to function, to review a total list of the available features sets on a cPanel server, please see "Feature Manager" in WHM.

DiskUsage::showmanager

API Version: 1 - Click here for documentation
Syntax: DiskUsage::showmanager( level, clear, parents, sort, showtree, diskaction, mainaction, humanbytes, skipsmall, actionfile, homeimage, disable_delete, sort_direction )
Description: Display the HTML for the disk usage interface. This function requires access to the 'diskusageviewer' feature. All parameters are optional.
Parameters:  
  level (integer)
  Specifies how many levels deep to display files. This parameter defaults to 2.
  clear (boolean)
  If this parameter is set to 1, disk usage (du) information will be refreshed. The disk usage data will be read from a cached source if this parameter is set to 0.
  parents (boolean)
  This parameter is not functional at this time.
  sort (boolean)
  This parameter enables or disables sorting via $sort_direction. This value defaults to 1.
  showtree (string)
  The directory to use as the parent directory. This parameter defaults to the account's home directory.
  diskaction (string)
  This parameter provides a secondary method for specifying other parameters. Acceptable values include:
'top' sets $level = 1
'show parent' sets $parents = 1
'hide parent' sets $parents = 0
'clear' sets $clear = 1
'show small' sets $skipsmall = 0
'hide small' sets $skipsmall = 1
'as bytes' sets $humanbytes = 0
'as megabytes' sets $humanbytes = 1
.
  mainaction (string)
  This parameter is a secondary way to specify other parameters. Acceptable values include:
'increase' or 'more' increments $level + 1
'decrease' or 'less' decrements $level - 1
.
  humanbytes (boolean)
  If this parameter is set to 1, file sizes will be printed in megabytes. Specifying 0 to this parameter causes the file sizes to be printed in bytes. This value defaults to 1.
  skipsmall (boolean)
  Passing 1 to this parameter skips files less than or equal to 8192 bytes, excluding directories. This value defaults to 0.
  actionfile (string)
  The HTML file to which file delete requests are sent. This value defaults to delfiles.html.
  homeimage (string)
  The image to use for the home directory icon. This value should be relative to index.html.
  disable_delete (boolean)
  If this parameter is set to 1, this function will remove the delete function from the Actions pull-down menu.
  sort_direction (boolean)
  Specifying 1 to this parameter causes the function to sort files alphabetically. This value defaults to 0.
Returns:  
 
Output will vary dramatically based on the files associated with the account and the options chosen.

Topic revision: r2 - 27 Mar 2012 - 17:51:42 - Main.JenniferDoubrava