CMD_API_FILE_MANAGER

Version 1.27.2

Feature
Finished

================= List all files and their info for a given path: method GET or POST path=/directory if nothing is passed, then / is assumed. You can use path=/ as well. Return format is quite huge <path/file>=path=name&type=file|dir&size=123inbytes&showsize=0.0k&perm=755&date=unixtime&uid=actualname&gid=actualgroup(not number)&truepath=/full/path/to/file&linkpath=/points/to/elsewhere &<path2/file2>=repeat format again. &<path3/file3>=repeat format again. linkpath will be blank for most cases, unless the file is a symbolic link, then it will contain info. If a symbolic link points to a directory, then islink=1 will also be present. It is not recommended to download files using CMD_API_FILE_MANAGER. It's better to use CMD_FILE_MANAGER as the ouput is always going to be just the file's data anyway. eg: CMD_FILE_MANAGER?path=/path/file.jpg ================= Upload a file: method must be POST enctype="multipart/form-data" .. must encode it properly. action=upload path=/path/you're/uploadingto file1=filename ... this isn't straight forward, you'll need to lookup up how a browser sends/encodes the files to duplicate this. ================= Compress a file: action=compress path=/path/you're in name=file to compress (DA will add .tar.gz, eg just use "file") It will compress the files listed in the /.clipboard.txt file. ================= Extract a file path=/path/to/file.tar.gz action=extract directory=/path/to/extraction page=2 ================= Protect a directory: http://www.directadmin.com/features.php?id=514 ================= Rename file/directory: method POST only. action=rename path=/filesdirectory old=file.html filename=newfile.html overwrite=yes|no (not passing this option is the same as 'no') ================= Copy file: method POST only. action=copy path=/filesdirectory old=file.html filename=newfile.html overwrite=yes|no (not passing this option is the same as 'no') ================= Create direcotry: method: GET or POST action=folder path=/current/path name=newfoldername ================= Set file(s) permission. method: GET or POST action=multiple permission=<anything> or button=permission chmod=755 path=/current/path select0=/current/path/file1 (select1=/current/path/file2 select2=etc..) ================= Add files to clipboard. method: GET or POST action=multiple add=<anything> path=/current/path select0=/current/path/file1 (select1=/current/path/file2 select2=etc..) ================= Delete files/directories method: GET or POST action=multiple button=delete path=/current/path select0=/current/path/file1 (select1=/current/path/file2 select2=etc..) ================= Copy clipboard files to this path. method: GET or POST action=multiple copy=<anything> path=/current/path ================= Move clipboard files to this path. method: GET or POST action=multiple move=<anything> path=/current/path ================= Empty Clipboard: method: GET or POST action=multiple empty=<anything> ================= View a file to edit: method: GET with *no* POST values at all. action=edit path=/current/path/youfile.txt was mainly added/documented here for the: json=yes output, as it's not terribly useful for the CMD_API version, since you can just grab the file directly. It's added for: CMD_FILE_MANAGER?json=yes&action=edit&... ================= Saved edited file: method: POST with *no* GET values at all. action=edit path=/current/path text=contents of the file filename=yourfile.txt ================= View a file that does not yet exist, to create: method: GET or POST action=file path=/current/path text=contents of the file name=yourfile.txt template=yes (optional: omit for no html) was mainly added/documented here for the: json=yes output, as it's not terribly useful for the CMD_API version, since you can just grab the file directly. It's added for: CMD_FILE_MANAGER?json=yes&action=file ================= Filesize for 1 file method: POST or GET action=filesize path=/path/to/file.txt returns: size=123456 (in bytes) or error=1 with error message

Try DirectAdmin with a 30-day money back guarantee!