RestoreResource Method
Restores a resource from the trash.
Syntax
ANSI (Cross Platform) int RestoreResource(const char* lpszResourceId, const char* lpszParentId, const char* lpszNewName); Unicode (Windows) INT RestoreResource(LPCWSTR lpszResourceId, LPCWSTR lpszParentId, LPCWSTR lpszNewName);
- (void)restoreResource:(NSString*)resourceId :(NSString*)parentId :(NSString*)newName;
#define MID_BOX_RESTORERESOURCE 24 IPWORKSCLOUD_EXTERNAL int IPWORKSCLOUD_CALL IPWorksCloud_Box_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);
Remarks
This method restores the resource specified by ResourceId from the trash.
Box will always ignore ParentId and/or NewName in favor of restoring a trashed resource to its original location with its original name if possible. The ParentId and NewName parameters are only considered if one or both of the following are true:
- The original parent folder resource no longer exists (in which case ParentId will be used instead, if not empty).
- The original resource name is already in use in the original (or new) parent folder (in which case NewName will be used instead, if not empty).
Error Handling (C++)
This method returns a 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. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)