Add fileExists utility function

This commit is contained in:
2024-03-23 19:30:38 +01:00
parent a31e549740
commit 0ed51ef979
2 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
package utilities
import (
"os"
)
// Checks if file on path exists or not
func FileExists(path string) bool {
_, err := os.Stat(path)
return !os.IsNotExist(err)
}