Given a list of fileHandle Objects, copy the fileHandles

copyFileHandles(fileHandles, associateObjectTypes, associateObjectIds, newContentTypes=NULL, newFileNames=NULL)

Arguments

fileHandles

List of fileHandle Ids or Objects

associateObjectTypes

List of associated object types: FileEntity, TableEntity, WikiAttachment, UserProfileAttachment, MessageAttachment, TeamAttachment, SubmissionAttachment, VerificationSubmission (Must be the same length as fileHandles).

associateObjectIds

List of associated object Ids: If copying a file, the objectId is the synapse id, and if copying a wiki attachment, the object id is the wiki subpage id. (Must be the same length as fileHandles).

newContentTypes

List of content types. Set each item to a new content type for each file handle, or leave the item as NULL to keep the original content type. Default NULL, which keeps all original content types.

newFileNames

List of filenames. Set each item to a new filename for each file handle, or leave the item as NULL to keep the original name. Default NULL, which keeps all original file names.

Details

Value

List of batch filehandle copy results, can include failureCodes: UNAUTHORIZED and NOT_FOUND

References

Note

See also

Examples

  if (FALSE) {
    copyFileHandles(list('19507670'), list('FileEntity'), list('syn11935399'), list('text'), list('newFile'))
  }