|
|
@ -13,7 +13,6 @@ class Entry { |
|
|
|
size { _size } |
|
|
|
size { _size } |
|
|
|
files { _files } |
|
|
|
files { _files } |
|
|
|
parent { _parent } |
|
|
|
parent { _parent } |
|
|
|
type { _files == null ? "file" : "dir" } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
total_size { |
|
|
|
total_size { |
|
|
|
if(_size) { |
|
|
|
if(_size) { |
|
|
@ -23,14 +22,6 @@ class Entry { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
toString { |
|
|
|
|
|
|
|
if(_files) { |
|
|
|
|
|
|
|
return "{" + _files.map {|entry| entry.key + ": " + entry.value.toString}.join(", ") + "}" |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return _size.toString |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iter_dirs(fn) { |
|
|
|
iter_dirs(fn) { |
|
|
|
if(_files) { |
|
|
|
if(_files) { |
|
|
|
fn.call(this) |
|
|
|
fn.call(this) |
|
|
|