summaryrefslogtreecommitdiffstats
path: root/sysfs/sysfsread.hpp
blob: aa769c4686f65f6059305c9da731f01e0cbd4ebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include "interfaces.hpp"
#include "util.hpp"

#include <string>

/*
 * A ReadInterface that is expecting a path that's sysfs, but really could be
 * any filesystem path.
 */
class SysFsRead : public ReadInterface
{
  public:
    SysFsRead(const std::string& path) : ReadInterface(), _path(FixupPath(path))
    {
    }

    ReadReturn read(void) override;

  private:
    const std::string _path;
};
OpenPOWER on IntegriCloud