Class: BrickFTP::RESTfulAPI::MoveFolder
- Inherits:
-
Object
- Object
- BrickFTP::RESTfulAPI::MoveFolder
- Includes:
- Command
- Defined in:
- lib/brick_ftp/restful_api/move_folder.rb
Overview
Move or rename a file or folder
Params
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
move-destination | string | Full path of the file or folder. Maximum of 550 characters. |
Defined Under Namespace
Classes: Params
Instance Method Summary collapse
-
#call(path, params) ⇒ Object
Moves or renames a file or folder to the destination provided in the
move-destination
parameter in the request body.
Methods included from Command
Instance Method Details
#call(path, params) ⇒ Object
Moves or renames a file or folder to the destination provided in
the move-destination
parameter in the request body.
Note that a move/rename will fail if the destination already exists.
35 36 37 38 |
# File 'lib/brick_ftp/restful_api/move_folder.rb', line 35 def call(path, params) client.post("/api/rest/v1/files/#{ERB::Util.url_encode(path)}", params.to_h.compact) true end |