Get files from directory sorted by name

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Wed Apr 25 19:25:11 UTC 2018


On Wednesday, 25 April 2018 at 17:34:41 UTC, Dr.No wrote:
> Is there something implemented already to get the files from 
> directory by name using D or I'm on my own and I have to write 
> it myself? I didn't find how do that with dirEntries()

I want to add that sorting can be done, if you just call 
std.algorithm.sort you'll find that file names with numbers in 
them will be sorted as a well strings.

Newfile1.txt
Newfile10.txt
Newfile2.txt


More information about the Digitalmars-d-learn mailing list