More file system checking functions:
- Stat#isFile - Stat#isDirectory - Directory.exists() - File.exists()
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import "io" for Directory
|
||||
|
||||
System.print(Directory.exists("test/io/file")) // expect: true
|
||||
System.print(Directory.exists("nonexistent")) // expect: false
|
||||
|
||||
// Files are not directories.
|
||||
System.print(Directory.exists("test/io/file/file.txt")) // expect: false
|
||||
|
||||
// TODO: Symlinks.
|
||||
Reference in New Issue
Block a user