Add Directory.list() to io.

This commit is contained in:
Bob Nystrom
2015-12-24 10:12:12 -08:00
parent 1ebc711c30
commit 0ac793d4f8
11 changed files with 188 additions and 56 deletions
+8
View File
@@ -0,0 +1,8 @@
import "io" for Directory
var entries = Directory.list("test/io/directory/dir")
// Ignore OS-specific dot files like ".DS_Store".
entries = entries.where {|entry| !entry.startsWith(".") }.toList
System.print(entries) // expect: [a.txt, b.txt, c.txt]