Refactor walkDirTree to use fs.FS

This commit is contained in:
Deluan
2023-06-03 22:25:19 -04:00
parent 257ccc5f43
commit 3853c3318f
5 changed files with 96 additions and 110 deletions
-18
View File
@@ -1,18 +0,0 @@
package utils
import (
"os"
"github.com/navidrome/navidrome/log"
)
func IsDirReadable(path string) (bool, error) {
dir, err := os.Open(path)
if err != nil {
return false, err
}
if err := dir.Close(); err != nil {
log.Error("Error closing directory", "path", path, err)
}
return true, nil
}