...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
The file type when rebound to the specified executor.
typedef basic_stream_file< Executor1 > other;
Name |
Description |
---|---|
Rebinds the file type to another executor. |
|
The type of the executor associated with the object. |
|
A bitmask type (C++ Std [lib.bitmask.types]). |
|
The native representation of a file. |
|
Basis for seeking in a file. |
Name |
Description |
---|---|
Assign an existing native file to the file. |
|
Start an asynchronous read. |
|
Start an asynchronous write. |
|
basic_stream_file [constructor] |
Construct a basic_stream_file without opening it. |
Cancel all asynchronous operations associated with the file. |
|
Close the file. |
|
Get the executor associated with the object. |
|
Determine whether the file is open. |
|
Get the native file representation. |
|
Open the file using the specified path. |
|
Move-assign a basic_stream_file from another. |
|
Read some data from the file. |
|
Release ownership of the underlying native file. |
|
Alter the size of the file. |
|
Seek to a position in the file. |
|
Get the size of the file. |
|
Synchronise the file to disk. |
|
Synchronise the file data to disk. |
|
Write some data to the file. |
|
~basic_stream_file [destructor] |
Destroys the file. |
Name |
Description |
---|---|
append [static] |
Open the file in append mode. |
create [static] |
Create the file if it does not exist. |
exclusive [static] |
Ensure a new file is created. Must be combined with create. |
read_only [static] |
Open the file for reading. |
read_write [static] |
Open the file for reading and writing. |
sync_all_on_write [static] |
Open the file so that write operations automatically synchronise the file data and metadata to disk. |
truncate [static] |
Open the file with any existing contents truncated. |
write_only [static] |
Open the file for writing. |
The basic_stream_file
class template
provides asynchronous and blocking stream-oriented file functionality.
Distinct objects: Safe.
Shared objects: Unsafe.
Header: boost/asio/basic_stream_file.hpp
Convenience header: boost/asio.hpp