Note that if you wish to delete a directory, you should use the corresponding function file:del_dir.
2> file:del_dir("/this/dir/will/soon/be/gone").
ok
The function deletes the given directory if it exists, returning ok if successful. An error will be returned if any part of the directory path is not a directory.