MoveResource Method

Moves a file or folder.

Syntax

int MoveResource(const QString& qsResourceId, const QString& qsNewParentIds);

Remarks

This method "moves" an existing file or folder specified by ResourceId to the folders specified by NewParentIds (which should be specified as a comma-separated list of folder resource Ids).

After this method returns, the folders specified by NewParentIds will be the only parents of in the resource's parent list. If you wish to add additional parents for the resource without removing its existing parents, use AddParents instead.

Note that resources within a shared drive must always have exactly one parent, and that only shared drive members with the "file organizer" or "organizer" roles can move files and folders within a shared drive.

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]