Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import std.stdio;
- import std.file;
- void main()
- {
- DirIterator entries = dirEntries("D:\\Video", SpanMode.breadth);
- string s;
- foreach(int i; [0,1,2])
- {
- writeln("-------");
- s = "hello";
- foreach(DirEntry e; entries)
- {
- writeln("this gets printed");
- s ~= "can you see me?";
- }
- }
- writeln(s); // prints "hello"
- }
Add Comment
Please, Sign In to add comment