diff options
author | Araq <rumpf_a@web.de> | 2015-11-10 15:35:02 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-11-10 15:35:02 +0100 |
commit | 7578d580e0167bcfbd77fe7fd1393cfa7a6f1ede (patch) | |
tree | 9734d7708c04fc242fb33ff719519a9c2b918470 | |
parent | 2aff71613464a27558c9e90cf85f038c240babb2 (diff) | |
download | Nim-7578d580e0167bcfbd77fe7fd1393cfa7a6f1ede.tar.gz |
added oswalkdir.nim for the JS target
-rw-r--r-- | lib/pure/oswalkdir.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/pure/oswalkdir.nim b/lib/pure/oswalkdir.nim new file mode 100644 index 000000000..a27b12a78 --- /dev/null +++ b/lib/pure/oswalkdir.nim @@ -0,0 +1,16 @@ + +type + PathComponent* = enum ## Enumeration specifying a path component. + pcFile, ## path refers to a file + pcLinkToFile, ## path refers to a symbolic link to a file + pcDir, ## path refers to a directory + pcLinkToDir ## path refers to a symbolic link to a directory + +proc staticWalkDir(dir: string; relative: bool): seq[ + tuple[kind: PathComponent, path: string]] = + discard + +iterator walkDir*(dir: string; relative=false): tuple[kind: PathComponent, path: string] {. + tags: [ReadDirEffect], compiletime.} = + for k, v in staticWalkDir(dir, relative)): + yield (k, v) |