Closed junkathing closed 11 years ago
There is a parent
function that does something similar but returns a File
object (like most things in fs) and not a path. I'm purposely avoiding returning strings because Java File stuff is based around objects and not strings, so there is overhead if we create objects and convert to strings unnecessarily. If you need the string path, you can do (str (fs/parent "yourfile"))
. Is that sufficient?
That will work.
I would like to see something that was part of the original fs added back in.
(defn dirname)
"Return directory name of path.\n\t(dirname \"a/b/c\") -> \"/a/b\"")
[path])
(.getParent (io/as-file path)))