Exists reports whether the file at path exists (and is reachable via Stat). Symlink targets are followed; broken symlinks return false.
(path string)
| 73 | // Exists reports whether the file at path exists (and is reachable via Stat). |
| 74 | // Symlink targets are followed; broken symlinks return false. |
| 75 | func Exists(path string) bool { |
| 76 | if path == "" { |
| 77 | return false |
| 78 | } |
| 79 | _, err := os.Stat(path) |
| 80 | return err == nil |
| 81 | } |
no outgoing calls