Patrick Venture | 863b924 | 2018-03-08 08:29:23 -0800 | [diff] [blame] | 1 | #pragma once |
2 | |||||
3 | #include <string> | ||||
4 | |||||
5 | #include "interfaces.hpp" | ||||
6 | #include "sysfs/util.hpp" | ||||
7 | |||||
8 | |||||
9 | /* | ||||
10 | * A ReadInterface that is expecting a path that's sysfs, but really could be | ||||
11 | * any filesystem path. | ||||
12 | */ | ||||
13 | class SysFsRead : public ReadInterface | ||||
14 | { | ||||
15 | public: | ||||
16 | SysFsRead(const std::string& path) | ||||
17 | : ReadInterface(), | ||||
18 | _path(FixupPath(path)) | ||||
19 | { } | ||||
20 | |||||
21 | ReadReturn read(void) override; | ||||
22 | |||||
23 | private: | ||||
24 | const std::string _path; | ||||
25 | }; |