Differences

This shows you the differences between the selected revisions of the page.

2009-03-03 2009-03-03
move exit code note to main text (martin) other operations (martin)
Line 68: Line 68:
The ''result'' child element is always present. Many other child elements may be absent in case of error. The ''result'' child element is always present. Many other child elements may be absent in case of error.
 +
 +==== call ====
 +Execution of arbitrary [[remote_command|remote shell command]] (with [[protocols|SFTP and SCP protocols]]) or execution of a protocol command (with FTP protocol).
 +
 +Elements:
 +^ Element                  ^ Description ^
 +| ''command''              | Command (in ''value'' attribute) |
 +| ''destination''          | Absolute path to current remote working directory (in ''value'' attribute) |
 +| ''output''              | Command standard output (in ''value'' attribute) |
 +| ''erroroutput''          | Command error output (in ''value'' attribute) |
 +
 +Example:
 +<code xml>
 +<call>
 +  <command value="ps" />
 +  <destination value="/home/user" />
 +    <output value="  PID TTY          TIME CMD
 +16969 ?        00:00:00 sshd
 +16970 ?        00:00:00 sftp-server
 +32647 ?        00:00:00 bash
 + 1466 ?        00:00:00 ps" />
 +    <result success="true" />
 +  </call>
 +</code>
 +
 +Associated script commands: ''[[script_commands#call|call]]''
 +
 +==== chmod ====
 +[[task_properties|Changing of permissions]] of one (or more) remote file.
 +
 +Elements:
 +^ Element                  ^ Description ^
 +| ''filename''            | Absolute path to remote file (in ''value'' attribute) |
 +| ''permissions''          | Permissions in Unix format ''rwxrwxrwx'' |
 +
 +With [[protocols#scp|SCP protocol]] optional boolean attribute ''recursive'' indicates, if permissions were changed recursively with single operation.
 +
 +Example:
 +<code xml>
 +<chmod recursive="true">
 +  <filename value="/home/martin/public_html/about.html" />
 +  <permissions value="rwxr-xr-x" />
 +  <result success="true" />
 +</touch>
 +</code>
 +
 +Associated script commands: ''[[script_commands#chmod|chmod]]'', ''[[script_commands#keepuptodate|keepuptodate]] -permissions'', ''[[script_commands#put|put]] -permissions'', ''[[script_commands#synchronize|synchronize]] remote|both -permissions''
 +
 +==== download ====
 +[[task_download|Downloading]] of single file.
 +
 +Elements:
 +^ Element                  ^ Description ^
 +| ''filename''            | Absolute path to source remote file (in ''value'' attribute) |
 +| ''destination''          | Absolute path to destination local file (in ''value'' attribute)((File name may differ from name of source file.)) |
 +
 +Example:
 +<code xml>
 +<download>
 +  <filename value="/home/martin/public_html/about.html" />
 +  <destination value="d:\www\about.htm" />
 +  <result success="true" />
 +</upload>
 +</code>
 +
 +Associated script commands: ''[[script_commands#get|get]]'', ''[[script_commands#synchronize|synchronize]] local|both''
 +
 +==== ls ====
 +Listing of remote directory (only when explicitly requested using ''[[script_commands#ls|ls]]'' scripting command).
 +
 +Elements:
 +^ Element                  ^ Description ^
 +| ''destination''          | Absolute path to remote directory (in ''value'' attribute) |
 +| ''files''                | Container of ''file'' elements |
 +
 +Elements of ''file'' element:
 +^ Element                  ^ Description ^
 +| ''filename''            | Name of file without path (in ''value'' attribute) |
 +| ''type''                | Type of file as in Unix ''ls'' command output, e.g. ''d'' for directory (in ''value'' attribute) |
 +| ''size''                | Size of file in bytes (in ''value'' attribute) |
 +| ''modification''        | Modification timestamp (in ''value'' attribute)((All timestamps in XML log have XML ''dateTime'' type, where only ''YYYY-MM-DD"T"HH:MM:SS.NNN"Z"'' syntax is used.)) |
 +| ''permissions''          | File permissions in Unix format ''rwxrwxrwx'' (in ''value'' attribute) |
 +
 +Example:
 +<code xml>
 +<ls>
 +  <destination value="/home/martin/public_html" />
 +  <files>
 +    <file>
 +      <filename value="." />
 +      <type value="d" />
 +      <modification value="2008-12-22T12:16:23.000Z" />
 +      <permissions value="rwxr-xr-x" />
 +    </file>
 +    <file>
 +      <filename value=".." />
 +      <type value="d" />
 +      <modification value="2008-03-25T08:15:53.000Z" />
 +      <permissions value="rwxr-xr-x" />
 +    </file>
 +    <file>
 +      <filename value=".htaccess" />
 +      <type value="-" />
 +      <size value="107" />
 +      <modification value="2008-12-02T06:59:58.000Z" />
 +      <permissions value="rw-r--r--" />
 +    </file>
 +    <file>
 +      <filename value="about.html" />
 +      <type value="-" />
 +      <size value="24064" />
 +      <modification value="2007-10-04T21:43:02.000Z" />
 +      <permissions value="rw-r--r--" />
 +    </file>
 +  </files>
 +  <result success="true" />
 +</ls>
 +</code>
 +
 +Associated script commands: ''[[script_commands#ls|ls]]''
 +
 +==== mkdir ====
 +[[task_create_directory|Creating of remote directory]].
 +
 +Elements:
 +^ Element                  ^ Description ^
 +| ''filename''            | Absolute path to remote directory (in ''value'' attribute) |
 +
 +Example:
 +<code xml>
 +<mkdir>
 +  <filename value="/home/martin/public_html/images" />
 +  <result success="true" />
 +</upload>
 +</code>
 +
 +Associated script commands: ''[[script_commands#keepuptodate|keepuptodate]]'', ''[[script_commands#mkdir|mkdir]]'', ''[[script_commands#put|put]]'', ''[[script_commands#synchronize|synchronize]] remote|both''
 +
 +==== mv ====
 +[[task_move_duplicate#move|Moving]] or of one remote file or directory to different remote directory or [[task_rename|renaming]] of one remote file or directory.
 +
 +Elements:
 +^ Element                  ^ Description ^
 +| ''filename''            | Absolute path to source local file (in ''value'' attribute) |
 +| ''destination''          | Absolute path to destination remote file (in ''value'' attribute)((File name may differ from name of source file.)) |
 +
 +Example:
 +<code xml>
 +<mv>
 +  <filename value="/home/martin/public_html/about.html" />
 +  <destination value="/tmp/about.bak" />
 +  <result success="true" />
 +</mv>
 +</code>
 +
 +Associated script commands: ''[[script_commands#mv|mv]]''
 +
 +==== rm ====
 +[[task_delete|Deleting]] of one (or more) remote file or directory.
 +
 +Elements:
 +^ Element                  ^ Description ^
 +| ''filename''            | Absolute path to remote file of directory (in ''value'' attribute) |
 +
 +With [[protocols#scp|SCP protocol]] optional boolean attribute ''recursive'' indicates, if remote directory was recursively deleted with all contained files with single operation.
 +
 +Example:
 +<code xml>
 +<rm recursive="true">
 +  <filename value="/home/martin/public_html/images" />
 +  <result success="true" />
 +</rm>
 +</code>
 +
 +Associated script commands: ''[[script_commands#get|get]] -delete'', ''[[script_commands#rm|rm]]'', ''[[script_commands#rmdir|rmdir]]'', ''[[script_commands#synchronize|synchronize]] local|both -delete''
==== upload ==== ==== upload ====
-[[task_upload|Upload]] of single file.+[[task_upload|Uploading]] of single file.
Elements: Elements:
Line 87: Line 262:
Associated script commands: ''[[script_commands#keepuptodate|keepuptodate]]'', ''[[script_commands#put|put]]'', ''[[script_commands#synchronize|synchronize]] remote|both'' Associated script commands: ''[[script_commands#keepuptodate|keepuptodate]]'', ''[[script_commands#put|put]]'', ''[[script_commands#synchronize|synchronize]] remote|both''
 +
 +==== touch ====
 +Changing of remote file timestamp.
 +
 +Elements:
 +^ Element                  ^ Description ^
 +| ''filename''            | Absolute path to remote file (in ''value'' attribute) |
 +| ''modification''        | Modification timestamp (in ''value'' attribute)((All timestamps in XML log have XML ''dateTime'' type, where only ''YYYY-MM-DD"T"HH:MM:SS.NNN"Z"'' syntax is used.)) |
 +
 +Example:
 +<code xml>
 +<touch>
 +  <filename value="/home/martin/public_html/about.html" />
 +  <modification value="2008-12-28T11:22:19.000Z" />
 +  <result success="true" />
 +</touch>
 +</code>
 +
 +Associated script commands: ''[[script_commands#keepuptodate|keepuptodate]]'', ''[[script_commands#put|put]] -preservetime'', ''[[script_commands#synchronize|synchronize]] remote|both''
 +
 +

Last modified: by martin