new FileSummary($tr)
The FileSummary class encapsulates the file summary values and
the logic to render it in the given container
Parameters:
Name | Type | Description |
---|---|---|
$tr |
table row element |
- Source:
Methods
add(file, update)
Adds file
Parameters:
Name | Type | Description |
---|---|---|
file |
file to add | |
update |
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 |
file to remove | |
update |
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: