| import ( | import ( | ||||
| "fmt" | "fmt" | ||||
| "io/ioutil" | "io/ioutil" | ||||
| "log" | |||||
| "os" | "os" | ||||
| "strings" | "strings" | ||||
| } | } | ||||
| return true | return true | ||||
| } | } | ||||
| func ensurePathExist(path string) { | |||||
| d := filepath.Dir(path) | |||||
| if !isFileExist(d) { | |||||
| log.Println("Creating path [" + d + "]") | |||||
| os.MkdirAll(d, 0700) | |||||
| } | |||||
| } |