Use faster walkDir on BSDs

This commit is contained in:
def
2015-02-24 23:39:08 +01:00
parent 34d87c105c
commit 5e8eaa5f97

View File

@@ -1301,7 +1301,7 @@ iterator walkDir*(dir: string): tuple[kind: PathComponent, path: string] {.
y = dir / y
var k = pcFile
when defined(linux) or defined(macosx):
when defined(linux) or defined(macosx) or defined(bsd):
if x.d_type != DT_UNKNOWN:
if x.d_type == DT_DIR: k = pcDir
if x.d_type == DT_LNK: k = succ(k)