summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-11-10 15:35:02 +0100
committerAraq <rumpf_a@web.de>2015-11-10 15:35:02 +0100
commit7578d580e0167bcfbd77fe7fd1393cfa7a6f1ede (patch)
tree9734d7708c04fc242fb33ff719519a9c2b918470
parent2aff71613464a27558c9e90cf85f038c240babb2 (diff)
downloadNim-7578d580e0167bcfbd77fe7fd1393cfa7a6f1ede.tar.gz
added oswalkdir.nim for the JS target
-rw-r--r--lib/pure/oswalkdir.nim16
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)