IPWorks Cloud 2020 Python Edition

Questions / Feedback?

copy_resource Method

Copies the currently selected resource.

Syntax

def copy_resource(parent_id: str, new_name: str) -> None: ...

Remarks

This method copies the resource currently selected by remote_id or remote_path. 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 copy_resource, the CopyStatusURL configuration setting will be populated with a copy operation monitor URL.

The poll_copy_status method can be used to retrieve the latest status of the copy operation specified by the CopyStatusURL configuration setting. Calling poll_copy_status will populate the copy_percent_done, copy_status, and (if applicable) copied_resource_id properties.

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