IPWorks Cloud 2020 macOS Edition

Questions / Feedback?

CopyResource Method

Copies the currently selected resource.

Syntax

public func copyResource(parentId: String, newName: String) throws -> Void

Remarks

This method copies the resource currently selected by RemoteId or RemotePath. The following outcomes are possible depending on which of NewName and ParentId are provided:

Parameters Provided Effect
Only NewName Copies the resource in place with the new name.
Only ParentId Copies the resource to the given parent with the same name.
NewName and ParentId Copies the resource to the given parent with the new name.
None Exception; at least one parameter must be provided.

ParentId, if provided, must either be the Id of a folder resource that already exists in the drive currently selected by Drive, or root (an alias for the root of the drive).

Monitoring Copy Operations

All copy operations are asynchronous. After calling CopyResource, the CopyStatusURL configuration setting will be populated with a copy operation monitor URL.

The PollCopyStatus method can be used to retrieve the latest status of the copy operation specified by the CopyStatusURL configuration setting. Calling PollCopyStatus will populate the CopyPercentDone, CopyStatus, and (if applicable) CopiedResourceId properties.

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