public override void Visit(Directory directory) { Console.WriteLine(currentdir + "/" + directory); string savedir = currentdir; currentdir = currentdir + "/" + directory.GetName(); IEnumerator it = directory.GetEnumerator(); while (it.MoveNext()) { Entry entry = (Entry)it.Current; entry.Accept(this); } currentdir = savedir; }
override public void Visit(Directory directory) { Debug.Log(currentdir + "/" + directory.toString()); string savedir = currentdir; currentdir = currentdir + "/" + directory.getName(); IEnumerator it = directory.Iterator(); while (it.MoveNext()) { Entry entry = (Entry)it.Current; entry.Accept(this); } currentdir = savedir; }