feature: added file exists checker

master
amorozov 2024-06-20 20:06:29 +03:00
parent b244663a4d
commit 34e5061740
1 changed files with 14 additions and 0 deletions

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
}