Closed rosejn closed 10 years ago
This is intentional. fs functions purposely return File objects whenever possible because usually that's what you actually want. It prevents unnecessary string -> File conversions when chaining functions as well.
You can also do (str (parent "path/to/file.txt"))
.
Ah, ok. I didn't realize you could use str on a file object to get the plain path. Thanks.
The parent method was returning a file object rather than a string path, which meant to get the directory of a file you had to do something like (.getPath (parent "path/to/my/file.txt")).