CreateDirs creates directories from the given directory path arguments.
(dirPaths ...string)
| 10 | |
| 11 | // CreateDirs creates directories from the given directory path arguments. |
| 12 | func CreateDirs(dirPaths ...string) error { |
| 13 | for _, path := range dirPaths { |
| 14 | if err := os.MkdirAll(path, 0755); err != nil { |
| 15 | return err |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | return nil |
| 20 | } |
| 21 | |
| 22 | // FileExists checks whether the given path exists and belongs to a file. |
| 23 | func FileExists(path string) (bool, error) { |
no outgoing calls
no test coverage detected