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
|
||
|
}
|