This article documents the usage of the Cpanel::Fileman::getedittype function in relation to the cPanel interface. This tag can be used inside cPanel pages.
Synopsis
Cpanel::Fileman::getedittype
Description
Outputs the type of file to be edited.
Variables
Input
- dir (string)
- Absolute path to the directory the file is in. If an absolute path to the directory is not passed, /home/username/ will be added to the beginning of the path.
- file (string)
Output
- type (string)
- Type of file. (css | html | php | perl | java | javascript)
Examples
<?cp Fileman::getedittype(%,type) dir=/home/user/public_html/,file=index.html ?>
This will output the type of the file index.html so that the appropriate editor can be used.
Copyright
Copyright 2007 cPanel Inc.
Topic revision: r2 - 07 Apr 2009 - 21:26:42 - Main.JustinSchaefer