MoveOrCopy is used to move or copy a file or directory organized by this Object to another directory or to rename a file or directory.
Signature
MoveOrCopy(
[in] NodeId objectToMoveOrCopy
[in] NodeId targetDirectory
[in] Boolean createCopy
[in] String newName
[out] NodeId newNodeId
);
Argument |
Description |
objectToMoveOrCopy |
The NodeId of the file or directory to move or copy. |
targetDirectory |
The NodeId of the target directory of the move or copy command. If the file or directory is just renamed, the targetDirectory matches the ObjectId passed to the method call. |
createCopy |
A flag indicating if a copy of the file or directory should be created at the target directory. |
newName |
The new name of the file or directory in the new location. If the string is empty, the name is unchanged. |
newNodeId |
The NodeId of the moved or copied object. Even if the Object is moved, the Server may return a new NodeId. |
Method Result Codes (defined in Call Service)
Result Code |
Description |
Bad_BrowseNameDuplicated |
See OPC 10000-4 for a general description. A file or directory with the name already exists. |
Bad_NotFound |
See OPC 10000-4 for a general description. A file or directory with the provided NodeId is not organized by this object. |
Bad_InvalidState |
See OPC 10000-4 for a general description. The file or directory is locked and thus cannot be moved or copied. |
Bad_UserAccessDenied |
See OPC 10000-4 for a general description. |
Table 12 specifies the AddressSpace representation for the MoveOrCopy Method.
Table 12 – MoveOrCopy Method AddressSpace definition
Attribute |
Value |
||||
BrowseName |
MoveOrCopy |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
HasProperty |
Variable |
InputArguments |
Argument[] |
PropertyType |
Mandatory |
HasProperty |
Variable |
OutputArguments |
Argument[] |
PropertyType |
Mandatory |
Conformance Units |
|||||
Base Info FileDirectoryType Base |