S3_File.move_to
move_todestination replace_existing
Documentation
Moves the file to the specified destination.
Arguments
destination: the destination to move the file to.replace_existing: specifies if the operation should proceed if the destination file already exists. Defaults toFalse.
Returns
- The destination file if the operation was successful.
Errors
- Unless
replace_existingis set toTrue, if the destination file already exists, aFile_Erroris thrown. - If the source is a directory, an
S3_Errorwill occur as this is not currently supported. - If the Output operations are disabled, a
Forbidden_Operationpanic will occur.
Remarks
S3 Move is a Copy and Delete
Since S3 does not support moving files, this operation is implemented as a copy followed by delete. Keep in mind that the space usage of the file will briefly be doubled and that the operation may not be as fast as a local move often is.