feature: added file exists checker
parent
b244663a4d
commit
34e5061740
|
@ -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