5 # Tomo includes a built-in literal type for file paths
6 # A path is inside parentheses and begins with `/`, `~`, `.` or `..`
8 path := (/tmp/test-file.txt)
9 assert path == (/tmp/test-file.txt)
12 assert path.read() == "???"
14 path.append(",second")!
16 assert path.exists() == yes
18 assert path.parent()! == (/???)
20 assert path.extension() == "???"
22 assert path.parent()!.child("other-file.txt") == (/???)
24 assert (/tmp/test-*.txt).glob() == [???]
28 assert path.exists() == ???