CopyResource Method
Copies a resource.
Syntax
ANSI (Cross Platform) char* CopyResource(const char* lpszResourceId, const char* lpszParentId, const char* lpszNewName); Unicode (Windows) LPWSTR CopyResource(LPCWSTR lpszResourceId, LPCWSTR lpszParentId, LPCWSTR lpszNewName);
- (NSString*)copyResource:(NSString*)resourceId :(NSString*)parentId :(NSString*)newName;
#define MID_BOX_COPYRESOURCE 5 IPWORKSCLOUD_EXTERNAL int IPWORKSCLOUD_CALL IPWorksCloud_Box_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);
Remarks
This method copies the resource specified by ResourceId to the folder specified by ParentId. The Id of the newly-copied resource is returned.
NewName specifies the name of the copied resource; if empty, the resource's original name is used. ParentId can also be empty, in which case the resource is copied to the root folder.
NewName must be no longer than 255 characters; may not contain /, \, non-printable ASCII characters, or trailing whitespace; and cannot be one of the special names . or ...
Note that copy operations for folders with greater than 500 children (counted recursively) are performed asynchronously; the server will return the Id of the newly-copied folder resource immediately while continuing to perform the copy operation over time. There is no way to monitor an asynchronous copy operation.
Error Handling (C++)
This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.