existsFile returns true if the given path is a file.
(filepath string)
| 91 | |
| 92 | // existsFile returns true if the given path is a file. |
| 93 | func existsFile(filepath string) bool { |
| 94 | fi, err := os.Lstat(filepath) |
| 95 | return err == nil && !fi.IsDir() |
| 96 | } |
| 97 | |
| 98 | // ensureDir creates a directory if it does not exist. |
| 99 | func ensureDir(dir string) (err error) { |
no outgoing calls