Cpanel::Fileman::fileop

This article documents the usage of the Cpanel::Fileman::fileop function in relation to the cPanel interface. This tag can be used inside cPanel pages.


SYNOPSIS

Cpanel::Fileman::fileop


DESCRIPTION

Renames, moves, copies or links a file in the user's home directory. This tag is intended for use with javascript and XHTML (AJAX) scripting.


VARIABLES

INPUT

NOTE
These inputs cannot be passed to the API2 tag, they are read from a form on the page.

sourcefiles
Absolute path to file(s) to be modified.

destfiles
Absolute path to file(s) to files after modification.

op
Operation to perform. (rename | move | copy | link)

OUTPUT

result (string)
Result of the file operation. (1 = Success, 0 = Failure)

src (string)
Source file.

dest (string)
File destination.

err (string)
If the result is 0, an error will be displayed.


EXAMPLES

<?cp Fileman::fileop(% % % %,result,^src,^dest,^err) ?>

This example will perform an action to a file based on the form variables passed to the page, and output the result of the operation, the source and destination files, and any errors, if applicable.


COPYRIGHT

Copyright 2006 cPanel Inc.