Seastar
High performance C++ framework for concurrent servers
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Classes | Namespaces | Functions
fstream.hh File Reference
#include <seastar/core/file.hh>
#include <seastar/core/iostream.hh>
#include <seastar/core/shared_ptr.hh>
#include <seastar/core/internal/api-level.hh>
#include <seastar/util/modules.hh>
#include <cstdint>

Go to the source code of this file.

Classes

class  seastar::file_input_stream_history
 
struct  seastar::file_input_stream_options
 Data structure describing options for opening a file input stream. More...
 
struct  seastar::file_output_stream_options
 

Namespaces

namespace  seastar
 Seastar API namespace.
 

Functions

input_stream< char > seastar::make_file_input_stream (file file, uint64_t offset, uint64_t len, file_input_stream_options options={})
 Creates an input_stream to read a portion of a file. More...
 
input_stream< char > seastar::make_file_input_stream (file file, uint64_t offset, file_input_stream_options={})
 Create an input_stream for a given file, reading starting at a given position of the given file, with the specified options. More...
 
input_stream< char > seastar::make_file_input_stream (file file, file_input_stream_options={})
 
future< output_stream< char > > seastar::make_file_output_stream (file file, uint64_t buffer_size=8192) noexcept
 
future< output_stream< char > > seastar::make_file_output_stream (file file, file_output_stream_options options) noexcept
 
future< data_sink > seastar::make_file_data_sink (file, file_output_stream_options) noexcept
 

Class Documentation

◆ seastar::file_input_stream_options

struct seastar::file_input_stream_options
Class Members
size_t buffer_size I/O buffer size.
lw_shared_ptr< file_input_stream_history > dynamic_adjustments Input stream history, if null dynamic adjustments are disabled.
unsigned read_ahead Maximum number of extra read-ahead operations.

◆ seastar::file_output_stream_options

struct seastar::file_output_stream_options
Class Members
unsigned buffer_size
unsigned preallocation_size Preallocate extents. For large files, set to a large number (a few megabytes) to reduce fragmentation.
unsigned write_behind Number of buffers to write in parallel.