mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-14 17:32:05 +08:00
15 lines
219 B
C++
15 lines
219 B
C++
#include "file_sensor.h"
|
|
|
|
#include <string>
|
|
|
|
FileSensor::FileSensor(std::string filename) : file(filename) {
|
|
}
|
|
|
|
int FileSensor::init() {
|
|
return file.is_open() ? 0 : 1;
|
|
}
|
|
|
|
FileSensor::~FileSensor() {
|
|
file.close();
|
|
}
|