private void button1_Click (object sender, System.EventArgs e) {digui (this.textBox1.Text);} private void digui (string path) {DirectoryInfo di = new DirectoryInfo (path); FileInfo [] SubFiles = di.GetFiles () ;
FileSysteminfo [] DIRS = di.getdirector (); this.richtextbox1.text = di.name "/ r / n"; // Add files in the current directory Foreach (fileInfo filenext in subfiles) {this.richtextbox1.text = " **** " filenext.name " / r / n ";} // subdirectory Regeneration Foreach (DirectoryInfo DINEXT IN DIRS) {this.richtextbox1.text =" **** "; DiGUI (DINEXT.FULLNAME);
}} ========= effect: a **** c.txt **** b **** E.txt should be: a **** c.txt **** b * ******* E.txt