snapshot of https://github.com/centrifugal/centrifugo.git (master, 2026-09-16; blobs > 131072B omitted)
This commit is contained in:
15
internal/tools/file.go
Normal file
15
internal/tools/file.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package tools
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
func FileExists(filename string) bool {
|
||||
_, err := os.Stat(filename)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return false // File does not exist.
|
||||
}
|
||||
}
|
||||
return true // File exists.
|
||||
}
|
||||
Reference in New Issue
Block a user