Class: FileSummary

OCA.FilesFileSummary($tr)

new FileSummary($tr)

The FileSummary class encapsulates the file summary values and the logic to render it in the given container
Parameters:
Name Type Attributes Description
$tr table row element
options.filesConfig OC.Backbone.Model <optional>
files app configuration
Source:

Methods

_isHiddenFile(fileInfo) → {boolean}

Returns whether the given file info must be hidden
Parameters:
Name Type Description
fileInfo OC.Files.FileInfo file info
Source:
Returns:
true if the file is a hidden file, false otherwise
Type
boolean

add(file, update)

Adds file
Parameters:
Name Type Description
file OC.Files.FileInfo file to add
update boolean whether to update the display
Source:

calculate(files)

Recalculates the summary based on the given files array
Parameters:
Name Type Description
files array of files
Source:

clear()

Clears the summary
Source:

getTotal()

Returns the total of files and directories
Source:

remove(file, update)

Removes file
Parameters:
Name Type Description
file OC.Files.FileInfo file to remove
update boolean whether to update the display
Source:

setSummary(summary)

Sets the current summary values
Parameters:
Name Type Description
summary map
Source:

update()

Renders the file summary element
Source: