Class: DropboxApi::Endpoints::Files::Move

Inherits:
Rpc
  • Object
show all
Defined in:
lib/dropbox_api/endpoints/files/move.rb

Constant Summary collapse

Method =
:post
Path =
"/2/files/move".freeze
ResultType =
DropboxApi::Metadata::Resource
ErrorType =
DropboxApi::Errors::RelocationError

Instance Method Summary collapse

Methods inherited from Rpc

#build_request, #initialize

Methods inherited from Base

add_endpoint

Constructor Details

This class inherits a constructor from DropboxApi::Endpoints::Rpc

Instance Method Details

#move(from, to) ⇒ Object

Move a file or folder to a different location in the user’s Dropbox.

If the source path is a folder all its contents will be moved.

Parameters:

  • from (String)

    Path in the user’s Dropbox to be copied or moved.

  • to (String)

    Path in the user’s Dropbox that is the destination.



15
16
17
18
19
20
# File 'lib/dropbox_api/endpoints/files/move.rb', line 15

add_endpoint :move do |from, to|
  perform_request({
    :from_path => from,
    :to_path => to
  })
end