Skip to main content

OneDrive_File.copy_to

copy_todestinationreplace_existing

Documentation

Copies the OneDrive file to the specified destination.

Arguments

  • destination: the destination to copy the file to.
  • replace_existing: specifies if the operation should proceed if the destination file already exists. Defaults to False.

Returns

  • The destination file if the operation was successful.

Errors

  • Unless replace_existing is set to True, if the destination file already exists, a File_Error is thrown.
  • If the source is a directory, an Illegal_Argument will occur as this is not currently supported.
  • If the Output operations are disabled, a Forbidden_Operation panic will occur.