Markus Pesch
6d9368e86c
changes: - sensor temperature add - sensor temperature list - sensor temperature rm - temperature get - temperature log - temperature push
15 lines
241 B
Go
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
|
|
}
|