Cpanel::Fileman::getedittype

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)
File name.

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.