IsNotExistCreateFile create a file if it does not exist
(src string)
| 181 | |
| 182 | // IsNotExistCreateFile create a file if it does not exist |
| 183 | func IsNotExistCreateFile(src string) error { |
| 184 | if notExist := CheckNotExist(src); notExist { |
| 185 | if err := CreateFile(src); err != nil { |
| 186 | return err |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | return nil |
| 191 | } |
| 192 | |
| 193 | func ReadFullFile(path string) []byte { |
| 194 | file, err := os.Open(path) |
no test coverage detected