FileExists reports whether the named file or directory exists.
(name string)
| 32 | |
| 33 | // FileExists reports whether the named file or directory exists. |
| 34 | func FileExists(name string) bool { |
| 35 | if _, err := os.Stat(name); err != nil { |
| 36 | if os.IsNotExist(err) { |
| 37 | return false |
| 38 | } |
| 39 | } |
| 40 | return true |
| 41 | } |
| 42 | |
| 43 | func CopyFile(dstName, srcName string) (written int64, err error) { |
| 44 | dstName = strings.TrimLeft(dstName, "./") |
no outgoing calls
no test coverage detected