mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[storage|aws] Add options to File#copy method
File#copy takes similar arguments to the #copy_object request
This commit is contained in:
parent
53bc5e3236
commit
e4431bea9d
1 changed files with 2 additions and 2 deletions
|
@ -46,9 +46,9 @@ module Fog
|
|||
@directory
|
||||
end
|
||||
|
||||
def copy(target_directory_key, target_file_key)
|
||||
def copy(target_directory_key, target_file_key, options = {})
|
||||
requires :directory, :key
|
||||
connection.copy_object(directory.key, key, target_directory_key, target_file_key)
|
||||
connection.copy_object(directory.key, key, target_directory_key, target_file_key, options)
|
||||
target_directory = connection.directories.new(:key => target_directory_key)
|
||||
target_directory.files.get(target_file_key)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue