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

[ninefold|storage] Add copy method to Ninefold::File.

This commit is contained in:
Benjamin Manns 2012-02-16 16:33:09 -05:00
parent de1ec2d079
commit b1c3e80c64

View file

@ -28,6 +28,14 @@ module Fog
@directory
end
def copy(target_directory_key, target_file_key, options={})
target_directory = connection.directories.new(:key => target_directory_key)
target_directory.files.create(
:key => target_file_key,
:body => body
)
end
def destroy
requires :directory, :key
connection.delete_namespace([directory.key, key].join('/'))