1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[rackspace|storage] Add copy method to Rackspace::File.

This commit is contained in:
Benjamin Manns 2012-02-16 14:41:55 -05:00
parent 4a97db0f2b
commit de1ec2d079

View file

@ -29,6 +29,13 @@ module Fog
@directory
end
def copy(target_directory_key, target_file_key, options={})
requires :directory, :key
connection.copy_object(directory.key, key, target_directory_key, target_file_key)
target_directory = connection.directories.new(:key => target_directory_key)
target_directory.files.get(target_file_key)
end
def destroy
requires :directory, :key
connection.delete_object(directory.key, key)