Ejemplo n.º 1
0
 public void Scan()
 {
     this.Nodes.Clear();
     //Get all the files in this directory, not these directories
     FileInfo[] fileList = (info as DirectoryInfo).GetFiles();
     foreach (FileInfo fi in fileList)
     {
         FileNode subNode = new FileNode(fi.FullName);
         this.Nodes.Add(subNode);
     }
     //Get all the directories in this directory, not these files
     DirectoryInfo[] dirList = (info as DirectoryInfo).GetDirectories();
     foreach (DirectoryInfo di in dirList)
     {
         DirectoryNode subNode = new DirectoryNode(di.FullName);
         this.Nodes.Add(subNode);
         subNode.Scan();
     }
 }
Ejemplo n.º 2
0
 public CDNNetWork(IPEndPoint point, String folder = "./")
     : base(point)
 {
     name      = folder;
     localRoot = new DirectoryNode(folder);
 }