copy: copy

copyR Documentation

copy

Description

- This function will assist users in copying entities (Tables, Links, Files, Folders, Projects), and will recursively copy everything in directories. - A Mapping of the old entities to the new entities will be created and all the wikis of each entity will also be copied over and links to synapse Ids will be updated.

Usage

copy(entity, destinationId, skipCopyWikiPage=FALSE, skipCopyAnnotations=FALSE, version=NULL, updateExisting=NULL, setProvenance=NULL, excludeTypes=NULL)

Arguments

entity

A synapse entity ID

destinationId

Synapse ID of a folder/project that the copied entity is being copied to

skipCopyWikiPage

Skip copying the wiki pages
Default is False

skipCopyAnnotations

Skips copying the annotations
Default is False

version

optional named parameter: Can specify version of a file.
Default to None

updateExisting

optional named parameter: When the destination has an entity that has the same name,
users can choose to update that entity.
It must be the same entity type
Default to False

setProvenance

optional named parameter: Has three values to set the provenance of the copied entity:
traceback: Sets to the source entity
existing: Sets to source entity's original provenance (if it exists)
None: No provenance is set

excludeTypes

optional named parameter: Accepts a list of entity types (file, table, link) which determines which entity types to not copy.
Defaults to an empty list.

Value

a mapping between the original and copied entity: 'syn1234':'syn33455'

Examples

  ## Not run: 
    copy("syn1234", "syn33455")
  
## End(Not run)

Sage-Bionetworks/synapserutils documentation built on Feb. 12, 2024, 10:31 a.m.