Files
beatglow/player/raudio/detect.go

18 lines
372 B
Go

package raudio
import (
"io/fs"
"os"
)
// Detect reports whether rAudio is installed locally.
func Detect() bool {
return detect(os.DirFS("/"))
}
func detect(root fs.FS) bool {
// rAudio stores its core environment variables in this configuration file.
info, err := fs.Stat(root, "srv/http/data/system/system.conf")
return err == nil && info.Mode().IsRegular()
}