I write a lot of programs, but I never publish them for others to use. Now with git and github, there aren’t any more real excuses.
Because I have been documenting like mad and cleaning up code, I am also taking the opportunity to push up working packages to github. So far I’ve pushed up two node.js utilities I am using. One is called makedir, and the other is called cas_validate
I had an old recursive directory creation program I wrote a while back for a node.js server I’m running, but it never seemed to work right.
Last week I went looking for something on github, and found a gist that seemed to be what I wanted, but it wasn’t. It didn’t understand absolute paths, and split on the ‘/’ which caused it to try to create the directory ”, which failed.
So I retooled my program, and did the work of figuring out why it worked when invoked with one directory, but failed when invoked on a list of directories.
First, here is my final version