def copy(source, target, options={})
      source = source.sub(/^\//, '')
      target = target.sub(/^\//, '')
      target << File.basename(source) if target.ends_with?('/')
      begin
        parse_metadata(post('fileops', 'copy', :from_path => Dropbox.check_path(source), :to_path => Dropbox.check_path(target), :root => root(options), :ssl => @ssl)).to_struct_recursively
      rescue UnsuccessfulResponseError => error
        raise FileNotFoundError.new(source) if error.response.kind_of?(Net::HTTPNotFound)
        raise FileExistsError.new(target) if error.response.kind_of?(Net::HTTPForbidden)
        raise error
      end
    end
def copy(source, target, options={})
      source = source.sub(/^\//, '')
      target = target.sub(/^\//, '')
      target << File.basename(source) if target.ends_with?('/')
      begin
        parse_metadata(post('fileops', 'copy', :from_path => Dropbox.check_path(source), :to_path => Dropbox.check_path(target), :root => root(options), :ssl => @ssl)).to_struct_recursively
      rescue UnsuccessfulResponseError => error
        raise FileNotFoundError.new(source) if error.response.kind_of?(Net::HTTPNotFound)
        raise FileExistsError.new(target) if error.response.kind_of?(Net::HTTPForbidden)
        raise error
      end
    end
Copies the +source+ file to the path at +target+. If +target+ ends with a
 slash, the new file will share the same name as the old file. Returns a
 +Struct+ with metadata for the new file. (See the metadata method.)

 Both paths are assumed to be relative to the configured mode's root.

 Raises FileNotFoundError if +source+ does not exist. Raises
 FileExistsError if +target+ already exists.

 Options:

 +mode+:: Temporarily changes the API mode. See the MODES array.

 TODO The API documentation says this method returns 404/403 if the source or target is invalid, but it actually returns 5xx.