Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/armed/mkdirp
- Owner: armed
- License: mit
- Created: 2013-11-25T12:24:18.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-30T15:20:25.000Z (about 11 years ago)
- Last Synced: 2024-11-07T06:49:14.898Z (2 months ago)
- Language: Go
- Homepage:
- Size: 148 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.