copy.Rd
- 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.
copy(entity, destinationId, skipCopyWikiPage=FALSE, skipCopyAnnotations=FALSE, version=NULL, updateExisting=FALSE, setProvenance=NULL, excludeTypes=NULL)
A synapse entity ID
Synapse ID of a folder/project that the copied entity is being copied to
Skip copying the wiki pages
Default is FALSE.
Skips copying the annotations
Default is FALSE.
Optional named parameter. (File copy only) Can specify version of a file. Defaults to NULL.
Optional named parameter. (File copy only) 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 Defaults to FALSE.
Optional named parameter. (File copy only) 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
Optional named parameter. (Folder/Project copy only) Accepts a list of entity types (file, table, link) which determines which entity types to not copy. Defaults to an empty list.
A mapping between the original and copied entity: 'syn1234':'syn33455'
if (FALSE) {
# copying files
copy(syn, "syn12345", "syn45678", updateExisting=False, setProvenance = "traceback",version = None)
# copying Folders/Projects
copy(syn, "syn123450", "syn345678", excludeTypes = list("file","table"))
}