Ejemplo n.º 1
0
 public DirectoryTree(string rootPath)
 {
     this.RootPath = rootPath;
     var root = Directory.GetParent(rootPath);
     
     rootFolder = new Folder(rootPath);
 }
Ejemplo n.º 2
0
        private long GetFilesSize(Folder folder)
        {
            long size = 0;

            foreach (var file in folder.Files)
            {
                size += file.SizeInBytes;
            }

            foreach (var subFolder in folder.Folders)
            {
                size += subFolder.GetFilesSize();
            }

            return size;
        }
 public DirectoryTree(string rootPath)
 {
     this.RootPath = rootPath;
     rootFolder = new Folder(rootPath);
 }