minor clean up

This commit is contained in:
chrislu
2022-08-25 00:19:08 -07:00
parent 2930263dfd
commit dbf0de4ce1
2 changed files with 15 additions and 1 deletions

View File

@@ -45,6 +45,16 @@ func FileExists(filename string) bool {
}
func FolderExists(folder string) bool {
fileInfo, err := os.Stat(folder)
if err != nil {
return false
}
return fileInfo.IsDir()
}
func CheckFile(filename string) (exists, canRead, canWrite bool, modTime time.Time, fileSize int64) {
exists = true
fi, err := os.Stat(filename)