Description

This function creates a new blank file.


Examples




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$create_file = $cpanel->api1('Fileman', 'fmmkfile', array('public_html', 'myfile', 'pl') ); // Call the function.



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $create_file = $cpliveapi->api1('Fileman', 'fmmkfile' ['public_html', 'myfile', 'pl']); # Call the function.


<cpanel Module="Fileman::fmmkfile ( $FORM('dir','newfile','template'))">




cpapi1 --user=username Fileman fmmkfile public_html myfile .pl



Creation of myfile.pl (Perl Script)succeeded.




Parameters

ParameterTypeDescriptionPossible valuesExample
dirstring

Required

The new file's directory.

Any valid directory name on the server.public_html
newfilestring

Required

The new file's name.

A valid filename.myfile
templatestring

Required

The new file's template.

  • .html
  • .pl
  • .sh
  • .txt
.pl

Returns

This function returns a message of success that contains the new file's name.