On Monday, 18 April 2016 at 20:24:40 UTC, Jesse Phillips wrote:
On Sunday, 17 April 2016 at 15:23:50 UTC, w0rp wrote:
void main() {
// Print all directories from this one up to and including
/.
getcwd()
.unaryRecurrence!dirName
.until("/", OpenRight.no)
.each!writeln;
}
FYI, OS independent version:
void main() {
// Print all directories from this one up to and including
/.
getcwd()
.unaryRecurrence!dirName
.until(rootName(getcwd()), OpenRight.no)
.each!writeln;
}
Probably should also make a call to absolutePath.
Nice!