PKGBUILD/pkg/sensor/sensor.go
Markus Pesch 6d9368e86c
fix: temperature, sensor
changes:
- sensor temperature add
- sensor temperature list
- sensor temperature rm
- temperature get
- temperature log
- temperature push
2018-11-21 19:30:14 +01:00

15 lines
241 B
Go

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
}