Class: DropboxApi::Endpoints::Files::Move
- Includes:
- OptionsValidator
- Defined in:
- lib/dropbox_api/endpoints/files/move.rb
Constant Summary collapse
- Method =
:post
- Path =
'/2/files/move'
- ResultType =
DropboxApi::Metadata::Resource
- ErrorType =
DropboxApi::Errors::RelocationError
Instance Method Summary collapse
-
#move(from, to, options = {}) ⇒ Object
Move a file or folder to a different location in the user's Dropbox.
Methods included from OptionsValidator
Methods inherited from Rpc
#build_connection, #build_request, #request_body
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Endpoints::Base
Instance Method Details
#move(from, to, options = {}) ⇒ 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.
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/dropbox_api/endpoints/files/move.rb', line 20 add_endpoint :move do |from, to, = {}| # We're not implementing support for the `allow_shared_folder` option # because according to Dropbox's documentation: "This field is always # true for move". ([ :autorename ], ) perform_request .merge({ from_path: from, to_path: to }) end |