I've written a considerable number of features since I listed the So far good progress! I already wrote the following features:
Probably, just after comments and author, I'm going to implement caching system.
[ID]: # (postid) [DATE]: # (postdate) [AUTHOR]: # (author name)
I used for the first time template parameters today.
First, let's check the sort algorithm and dirEntries
//First sortedRange SortedRange!(Range, less) sort(alias less = "a < b", SwapStrategy ss = SwapStrategy.unstable, Range)(Range r) //Now dirEntries DirIterator dirEntries(string path, SpanMode mode, bool followSymlink = true);
Although it looks simple, dirEntries returns DirIterator and sort requires a range. Luckly the solution is pretty simple
auto dir_list = array(base_dir.dirEntries(SpanMode.shallow));
Now, we have a range based on DirIterator. The only thing we need is to invert less operator
sort!("a.name > b.name")(dir_list);
Done. We have our list sorted from Z to A.
Some other option we have:
sort!("a.timeLastModified > b.timeLastModified")(dir_list); sort!("a.size > b.size")(dir_list); sort!("a.timeCreated > b.timeCreated")(dir_list);