Seastar
High performance C++ framework for concurrent servers
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
read_first_line.hh
1#include <filesystem>
2#include <seastar/core/sstring.hh>
3#ifndef SEASTAR_MODULE
4#include <boost/lexical_cast.hpp>
5#endif
6
7namespace seastar {
8
9sstring read_first_line(std::filesystem::path sys_file);
10
11template <typename Type>
12Type read_first_line_as(std::filesystem::path sys_file) {
13 return boost::lexical_cast<Type>(read_first_line(sys_file));
14}
15
16}
Seastar API namespace.
Definition: abort_on_ebadf.hh:26