internal long CalculateSize() { long sum = 0; foreach (IMediaItem item in _items) { MediaFolder folder = item as MediaFolder; if (folder != null) { sum += folder.CalculateSize(); } else { MediaFile file = item as MediaFile; sum += file.Length; } } return(sum); }
public void Refresh() { // TODO: Figure out a way to update space nicely WITHOUT rewalking everything _available = _root.CalculateSize(); }