PKGBUILD/pkg/sensor/sensor.go

15 lines
241 B
Go
Raw Normal View History

package sensor
import (
"os"
"path/filepath"
)
func sensorExists(wirePath, sensorID string) bool {
sensorPath := filepath.Join(wirePath, sensorID)
if _, err := os.Stat(sensorPath); os.IsNotExist(err) {
return false
}
return true
}