feature: added file exists checker
This commit is contained in:
parent
b244663a4d
commit
34e5061740
14
pkg/io/files/file_exists_checker.go
Normal file
14
pkg/io/files/file_exists_checker.go
Normal 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user