Maybe Make Directory
You want to create a directory only if it doesn't already exist.
The filelib:ensure_dir function does this for you:
1> filelib:ensure_dir("/what/a/great/test"). ok
In many scripting applications you have to create a directory the first time the script is run (for example, to store log files) but not on future runs of the script. Luckily, the Erlang standard libraries provides this useful function that solves this problem nicely.