Class: ElFinder2::Command::Size
- Includes:
- HashUtils
- Defined in:
- lib/el_finder2/command/size.rb
Overview
Returns the size of a directory or file.
Instance Method Summary collapse
-
#execute ⇒ Object
Response: size: The total size for all the supplied targets.
Methods included from HashUtils
#from_base64url, #to_base64url, #to_path
Methods inherited from Base
Constructor Details
This class inherits a constructor from ElFinder2::Command::Base
Instance Method Details
#execute ⇒ Object
Response:
size: The total size for all the supplied targets.
9 10 11 12 13 |
# File 'lib/el_finder2/command/size.rb', line 9 def execute size = @targets.sum(&:size) render json: { size: size } end |