2 * Copyright (C) 2011-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
13 bool CSysfsPath::Exists()
15 std::ifstream
file(m_path
);
24 std::optional
<std::string
> CSysfsPath::Get()
28 std::ifstream
file(m_path
);
32 std::getline(file
, value
);
36 CLog::LogF(LOGERROR
, "error reading from '{}'", m_path
);
42 catch (const std::exception
& e
)
44 CLog::LogF(LOGERROR
, "exception reading from '{}': {}", m_path
, e
.what());