twrap_walkdir.nim 266 B

123456789101112131415161718
  1. discard """
  2. action: compile
  3. """
  4. import os
  5. # bug #3636
  6. proc fooIt(foo: string): iterator(): (string) =
  7. iterator temp(): (string) =
  8. for f in walkDirRec(foo): # No problem with walkFiles
  9. yield f
  10. return temp
  11. let it = fooIt(".")
  12. for x in it():
  13. echo x