|
file.copy
|
| |
|
description
Copy a file from a relative source to relative destination inside one site.
User should have site filesystem privilege on source/dest site.
If the overwrite mode is not set and
destination file allready exist, the new target file will have a name postfixed by a number.
privilege-required
anyone
tx-support
false
|
| |
|
INSTRUCTION
|
|
name
|
type
|
default-value
|
required
|
description
|
| destination-site-id |
integer |
none |
false |
(User should have filesystem access privilege in the given site). Site to where the destination file will be copied. |
| source-uri |
string |
none |
true |
URI of the source file. |
| overwrite |
boolean |
none |
false |
If set false, then a new file name (adding a postfix) is set if the destination file already exists. |
| source-site-id |
integer |
none |
false |
(User should have filesystem access privilege in the given site). Site from where the source file will be copied. |
| destination-uri |
string |
none |
true |
URI of the destination file. |
|
| |
|
ERROR
|
|
|
id
|
msg
|
| 1 |
File does not exist |
| 10 |
User do not have file system access privilege in source or destination site |
| @TEMP_FOLDER_RESTRICT@ |
@TEMP_FOLDER_RESTRICT_MSG@ |
| 11 |
Unknown site Id |
|
| |
|
RESULT
|
|
|
name
|
description
|
| uri |
URI of the new file. |
|
| |
|
EXAMPLE
|
|
|
example 1
|
Cross site copy
<nvd:command name="file.copy" source-uri="/source/file.xml" source-site-id="10"
destination-uri="/dest/file2.xml" destination-site-id="20"
overwrite="false" />
|
| |
|
example 2
|
Simple site copy
<nvd:command name="file.copy" source-uri="/source/file.xml"
destination-uri="/dest/file2.xml"
overwrite="true" />
|
|