mirror of
https://git.mills.io/saltyim/saltyim.git
synced 2024-06-28 09:41:02 +00:00
14 lines
225 B
Go
14 lines
225 B
Go
package internal
|
|
|
|
import "os"
|
|
|
|
// FileExists returns true if the given file exists
|
|
func FileExists(name string) bool {
|
|
if _, err := os.Stat(name); err != nil {
|
|
if os.IsNotExist(err) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|