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".freeze
- 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
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Endpoints::Rpc
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.
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/dropbox_api/endpoints/files/move.rb', line 19 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 |