Class: BrickFTP::RESTfulAPI::GetFolderSize

Inherits:
Object
  • Object
show all
Includes:
Command
Defined in:
lib/brick_ftp/restful_api/get_folder_size.rb

Overview

Get folder size

See Also:

Instance Method Summary collapse

Methods included from Command

included, #initialize

Instance Method Details

#call(path) ⇒ Integer

Returns the size (in bytes) of the specified folder, recursively.

Parameters:

  • path (String)

Returns:

  • (Integer)


19
20
21
22
# File 'lib/brick_ftp/restful_api/get_folder_size.rb', line 19

def call(path)
  res = client.get("/api/rest/v1/folders/#{ERB::Util.url_encode(path)}?action=size")
  res['data']['size']
end