1
0
Fork 0
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:
Aaron Suggs 2011-09-04 09:41:42 -04:00
parent 53bc5e3236
commit e4431bea9d

View file

@ -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