class
file_stream_baseImplements the common interface of every file_stream
.
Derived classes
- class binary_io::file_istream final
- A stream which composes a file handle.
- class binary_io::file_ostream final
- A stream which composes a file handle.
Constructors, destructors, conversion operators
- file_stream_base() defaulted noexcept
-
file_stream_base(const file_
stream_ base&) deleted -
file_stream_base(file_
stream_ base&&) defaulted noexcept - ~file_stream_base() defaulted noexcept
Public functions
-
auto operator=(const file_
stream_ base&) -> file_ stream_ base& deleted -
auto operator=(file_
stream_ base&&) -> file_ stream_ base& defaulted noexcept
Buffer management
Buffering
- void flush() noexcept
- Flushes the underlying file buffer.
File operations
Position
-
void seek_absolute(binary_io::
streamoff a_pos) noexcept - Seek to an absolute position in the stream (i.e. from the beginning).
-
void seek_relative(binary_io::
streamoff a_off) noexcept - Seek to a position in the stream relative to the current position.
-
auto tell() const -> binary_io::
streamoff noexcept - Gets the current stream position.
Function documentation
void binary_io:: components:: file_stream_base:: close() noexcept
Closes the stream's file handle, if applicable.
bool binary_io:: components:: file_stream_base:: is_open() const noexcept
Checks if the stream has an open file handle.
Returns | true if the stream has an open file handle, false otherwise. |
---|
void binary_io:: components:: file_stream_base:: seek_absolute(binary_io:: streamoff a_pos) noexcept
Seek to an absolute position in the stream (i.e. from the beginning).
Parameters | |
---|---|
a_pos | The absolute position to seek to. |
void binary_io:: components:: file_stream_base:: seek_relative(binary_io:: streamoff a_off) noexcept
Seek to a position in the stream relative to the current position.
Parameters | |
---|---|
a_off | The offset to seek to. |
binary_io:: streamoff binary_io:: components:: file_stream_base:: tell() const noexcept
Gets the current stream position.
Returns | The current stream position. |
---|