14 lines
214 B
Go
14 lines
214 B
Go
|
package fs
|
||
|
|
||
|
import "os"
|
||
|
|
||
|
// Exists returns if a file exists
|
||
|
func Exists(path string) bool {
|
||
|
if _, err := os.Stat(path); err != nil {
|
||
|
return false
|
||
|
} else if os.IsNotExist(err) {
|
||
|
return false
|
||
|
}
|
||
|
return true
|
||
|
}
|