module Dropbox::API::Fileops

Public Instance Methods

copy(to, options = {}) click to toggle source
# File lib/dropbox-api/objects/fileops.rb, line 6
def copy(to, options = {})
  response = client.raw.copy({ :from_path => self.path, :to_path => to }.merge(options))
  self.update response
end
destroy(options = {}) click to toggle source
# File lib/dropbox-api/objects/fileops.rb, line 16
def destroy(options = {})
  response = client.raw.delete({ :path => self.path }.merge(options))
  self.update response
end
move(to, options = {}) click to toggle source
# File lib/dropbox-api/objects/fileops.rb, line 11
def move(to, options = {})
  response = client.raw.move({ :from_path => self.path, :to_path => to }.merge(options))
  self.update response
end
path() click to toggle source
# File lib/dropbox-api/objects/fileops.rb, line 21
def path
  self['path'].sub(/^\//, '')
end
share_url(options = {}) click to toggle source
# File lib/dropbox-api/objects/fileops.rb, line 25
def share_url(options = {})
  response = client.raw.shares({ :path => self.path }.merge(options))
  Dropbox::API::Object.init(response, client)
end