lib/brick_ftp/restful_api/delete_folder.rb
# Deletes a file or folder.
#
# Note that this operation works for both files and folders, but normally it will only work on empty folders.
# If you want to recursively delete a folder and all its contents, send the request with a `Depth` header
# with the value set to `infinity`.
#
# @param [String] path Full path of the file or folder. Maximum of 550 characters.
# @param [Boolean] recursive
#
Deletes a file or folder.
Note that this operation works for both files and folders, but normally it will only work on empty folders.
If you want to recursively delete a folder and all its contents, send the request with a `Depth` header
with the value set to `infinity`.
Deletes a file or folder . Note that this operation works for both files and folders but normally it will only work on empty folders . If you want to recursively delete a folder and all its contents send the request with a ` Depth ` header with the value set to ` infinity ` .
def call(path, recursive: false)
        headers = {}
        headers = { 'Depth' => 'infinity' } if recursive
        client.delete("/api/rest/v1/files/#{ERB::Util.url_encode(path)}", headers)
        true
      end
def call ( path , recursive : false ) headers = { } headers = { 'Depth' => 'infinity' } if recursive client . delete ( "/api/rest/v1/files/#{ERB::Util.url_encode(path)}" , headers ) true end
Deletes a file or folder.
Deletes a file or folder .
path
recursive
None