Description

This function creates a new directory.


Examples




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



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


<cpanel Module="Fileman::fmmkdir ( $FORM('dir','file'))">




cpapi1 --user=username Fileman fmmkdir public_html directory



Created /home/USER/DIRECTORY




Parameters

ParameterTypeDescriptionPossible valuesExample
dirstring

Required

The new directory's parent directory.

Any valid directory name on the server.public_html
filestring

Required

The new directory name.

Any valid directory name.directory

 Returns

This function returns a message of success with the new directory's path from the /home directory.