public static SubTreeData GetSubTreeData(IArchiveFile vfsSubtree) { var result = new SubTreeData(); if (vfsSubtree != null) { GetSubTreeDataRecursive(vfsSubtree, result); } return result; }
public static SubTreeData GetSubTreeData(IArchiveFile vfsSubtree) { var result = new SubTreeData(); if (vfsSubtree != null) { GetSubTreeDataRecursive(vfsSubtree, result); } return(result); }
private static void GetSubTreeDataRecursive(IArchiveFile vfsSubtree, SubTreeData data) { if (vfsSubtree.IsFolder) { foreach (var file in vfsSubtree.Children.Values) { GetSubTreeDataRecursive(file, data); } } else { data.FileCount++; data.BytesCount += vfsSubtree.Size; } }
private static void GetSubTreeDataRecursive(IArchiveFile vfsSubtree, SubTreeData data) { if (vfsSubtree.IsFolder) { foreach (var file in vfsSubtree.Children.Values) { GetSubTreeDataRecursive(file, data); } } else { data.FileCount++; data.BytesCount += vfsSubtree.Size; } }