digitalmars.D.learn - listdir
- hadas (14/14) Mar 14 2017 Hi,
- Daniel Kozak via Digitalmars-d-learn (4/16) Mar 14 2017 There is no such function in D2
Hi, I'm trying to read all the txt files in specific path. I tried to use listdir function, but I get this error: Error: undefined identifier 'listdir' in module 'std.file' import std.stdio; import std.file; void main(string[] args) { auto vm_files = std.file.listdir("C:/Users/hadas/Documents/d", "*.txt"); foreach(d;vm_files) writeln(d); }
Mar 14 2017
There is no such function in D2 You can use dirEntries https://dlang.org/phobos/std_file.html#.dirEntries.2 Dne 14.3.2017 v 16:04 hadas via Digitalmars-d-learn napsal(a):Hi, I'm trying to read all the txt files in specific path. I tried to use listdir function, but I get this error: Error: undefined identifier 'listdir' in module 'std.file' import std.stdio; import std.file; void main(string[] args) { auto vm_files = std.file.listdir("C:/Users/hadas/Documents/d", "*.txt"); foreach(d;vm_files) writeln(d); }
Mar 14 2017