mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:51:50 +00:00
16 lines
215 B
Go
16 lines
215 B
Go
package internal
|
|
|
|
import "os"
|
|
|
|
func FileExists(path string) (bool, error) {
|
|
if _, err := os.Stat(path); err != nil {
|
|
if !os.IsNotExist(err) {
|
|
return false, err
|
|
}
|
|
|
|
return false, nil
|
|
}
|
|
|
|
return true, nil
|
|
}
|