CopyResource Method

Copies a resource.

Syntax

QString CopyResource(const QString& qsFromResource, const QString& qsToResourcePath);

Remarks

This method copies the resource FromResource to a new path ToResourcePath, and returns the Id of the newly-copied resource.

FromResource must be a path, an Id-based relative path, or a resource Id. ToResourcePath must be a path or an Id-based relative path (it must always end with the desired name of the file/folder resource being copied).

The AllowCopySharedFolders configuration setting must be enabled before calling this method in order to copy shared resources.

The RenameIfExists configuration setting may be enabled before calling this method to have the server automatically resolve naming conflicts.

Error Handling

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.

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