(srcFile, dstFile string)
| 49 | } |
| 50 | |
| 51 | func Copy(srcFile, dstFile string) error { |
| 52 | out, err := os.Create(dstFile) |
| 53 | if err != nil { |
| 54 | return err |
| 55 | } |
| 56 | |
| 57 | defer out.Close() |
| 58 | |
| 59 | in, err := os.Open(srcFile) |
| 60 | if err != nil { |
| 61 | return err |
| 62 | } |
| 63 | defer in.Close() |
| 64 | |
| 65 | _, err = io.Copy(out, in) |
| 66 | return err |
| 67 | } |
| 68 | |
| 69 | func Exists(filePath string) bool { |
| 70 | if _, err := os.Stat(filePath); os.IsNotExist(err) { |
no test coverage detected