Class: DropboxApi::Endpoints::Files::Copy
- Defined in:
- lib/dropbox_api/endpoints/files/copy.rb
Constant Summary collapse
- Method =
:post
- Path =
"/2/files/copy".freeze
- 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_request, #initialize, #request_body
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Endpoints::Rpc
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.
14 15 16 17 18 19 |
# File 'lib/dropbox_api/endpoints/files/copy.rb', line 14 add_endpoint :copy do |from, to| perform_request({ :from_path => from, :to_path => to }) end |