mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 20:17:42 +00:00
added oswalkdir.nim for the JS target
This commit is contained in:
16
lib/pure/oswalkdir.nim
Normal file
16
lib/pure/oswalkdir.nim
Normal file
@@ -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)
|
||||
Reference in New Issue
Block a user