I was looking for a way to implement recursive mkdir (i.e., mkdir -p). Since the library does not have such a function out of the box, I would like to take a stab at it.
I have called it f-mkdir-recursive. It uses f-traverse-upwards and tries to maintain an interface as similar to f-mkdir as possible. All suggestions about how to make the function more efficient are super welcome.
Initial benchmarking (folder ~/exp was already created before running these tests) shows it is faster than make-directory. I am sure this comes at a cost, but I am not able to tell what this cost is.
I was looking for a way to implement recursive
mkdir
(i.e.,mkdir -p
). Since the library does not have such a function out of the box, I would like to take a stab at it.I have called it
f-mkdir-recursive
. It usesf-traverse-upwards
and tries to maintain an interface as similar tof-mkdir
as possible. All suggestions about how to make the function more efficient are super welcome.Initial benchmarking (folder
~/exp
was already created before running these tests) shows it is faster thanmake-directory
. I am sure this comes at a cost, but I am not able to tell what this cost is.