Get files from directory sorted by name
Dr.No
jckj33 at gmail.com
Thu Apr 26 16:59:45 UTC 2018
On Wednesday, 25 April 2018 at 19:25:11 UTC, Jesse Phillips wrote:
> 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
I've had realized that then implemented natural sort
More information about the Digitalmars-d-learn
mailing list