RestoreResource Method

Restores a resource from the trash.

Syntax

int RestoreResource(const QString& qsResourceId, const QString& qsParentId, const QString& qsNewName);

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

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.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Qt Edition - Version 20.0 [Build 8265]