Seastar
High performance C++ framework for concurrent servers
|
These utilities are provided to help perform operations on files and I/O streams.
Functions | |
template<typename Func > requires std::invocable<Func, input_stream<char>&> | |
futurize< typenamestd::invoke_result_t< Func, input_stream< char > & > >::type | seastar::util::with_file_input_stream (const std::filesystem::path &path, Func func, file_open_options file_opts={}, file_input_stream_options input_stream_opts={}) |
future< std::vector< temporary_buffer< char > > > | seastar::util::read_entire_file (std::filesystem::path path) |
future< sstring > | seastar::util::read_entire_file_contiguous (std::filesystem::path path) |
future< std::vector< temporary_buffer< char > > > seastar::util::read_entire_file | ( | std::filesystem::path | path | ) |
Returns all bytes from the file until eof, accessible in chunks.
path | path of the file to be read. |
future< sstring > seastar::util::read_entire_file_contiguous | ( | std::filesystem::path | path | ) |
Returns all bytes from the file until eof as a single buffer.
path | path of the file to be read. |