feature: added file exists checker

This commit is contained in:
amorozov 2024-06-20 20:06:29 +03:00
parent b244663a4d
commit 34e5061740

View File

@ -0,0 +1,14 @@
package files
import (
"errors"
"os"
)
func IsFileExists(fileLocation string) bool {
if _, err := os.Stat(fileLocation); errors.Is(err, os.ErrNotExist) {
return false
}
return true
}