Class: DropboxApi::Endpoints::Files::Copy
- Defined in:
- lib/dropbox_api/endpoints/files/copy.rb
Constant Summary collapse
- Method =
:post
- Path =
'/2/files/copy'
- ResultType =
DropboxApi::Metadata::Resource
- ErrorType =
DropboxApi::Errors::RelocationError
Instance Method Summary collapse
-
#copy(from, to) ⇒ Object
Copy a file or folder to a different location in the user's Dropbox.
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
#copy(from, to) ⇒ Object
Copy 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 copied.
15 16 17 18 19 20 |
# File 'lib/dropbox_api/endpoints/files/copy.rb', line 15 add_endpoint :copy do |from, to| perform_request({ from_path: from, to_path: to }) end |