mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 13:07:36 +03:00
18 lines
302 B
Go
18 lines
302 B
Go
package utils
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/deluan/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
|
|
}
|