Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/armed/mkdirp

Make directory tree with one function call.
https://github.com/armed/mkdirp

Last synced: 24 days ago
JSON representation

Make directory tree with one function call.

Awesome Lists containing this project

README

        

mkdirp
======

Make directory tree with one function call.

####Example

```Go
package "main"

import (
"github.com/armed/mkdirp"
"log"
)

func main() {
err := mkdirp.Mk("/Users/armed/{somefolder1,somefolder2}/test/{data1,data2}")
if err != nil {
log.Fatal(err)
}
}
```

Following directory tree will be created:
```
Users
|__armed
|__somefolder1
| |__test
| |__data1
| |__data2
|__somefolder2
|__test
|__data1
|__data2
```
`mkdirp.Mk` function internally uses `os.MkdirAll`, and returns errors from it if any.