|
See RawByteContainer for RawByteContainer requirements.
|
template<class RawByteContainer > |
void | asioext::read_file (const char *filename, RawByteContainer &c) |
|
template<class RawByteContainer > |
void | asioext::read_file (const char *filename, RawByteContainer &c, error_code &ec) |
|
template<class RawByteContainer > |
void | asioext::read_file (const wchar_t *filename, RawByteContainer &c) |
|
template<class RawByteContainer > |
void | asioext::read_file (const wchar_t *filename, RawByteContainer &c, error_code &ec) |
|
template<class RawByteContainer > |
void | asioext::read_file (const boost::filesystem::path &filename, RawByteContainer &c) |
|
template<class RawByteContainer > |
void | asioext::read_file (const boost::filesystem::path &filename, RawByteContainer &c, error_code &ec) |
|
template<class RawByteContainer > |
void | asioext::read_file (file_handle file, RawByteContainer &c) |
|
template<class RawByteContainer > |
void | asioext::read_file (file_handle file, RawByteContainer &c, error_code &ec) noexcept |
|
|
template<class MutableBufferSequence > |
void | asioext::read_file (const char *filename, const MutableBufferSequence &buffers) |
|
template<class MutableBufferSequence > |
void | asioext::read_file (const char *filename, const MutableBufferSequence &buffers, error_code &ec) noexcept |
|
template<class MutableBufferSequence > |
void | asioext::read_file (const wchar_t *filename, const MutableBufferSequence &buffers) |
|
template<class MutableBufferSequence > |
void | asioext::read_file (const wchar_t *filename, const MutableBufferSequence &buffers, error_code &ec) noexcept |
|
template<class MutableBufferSequence > |
void | asioext::read_file (const boost::filesystem::path &filename, const MutableBufferSequence &buffers) |
|
template<class MutableBufferSequence > |
void | asioext::read_file (const boost::filesystem::path &filename, const MutableBufferSequence &buffers, error_code &ec) noexcept |
|
template<class MutableBufferSequence > |
void | asioext::read_file (file_handle file, const MutableBufferSequence &buffers) |
|
template<class MutableBufferSequence > |
void | asioext::read_file (file_handle file, const MutableBufferSequence &buffers, error_code &ec) noexcept |
|
Reads the entire contents of a file into memory.
◆ read_file() [1/16]
template<class RawByteContainer >
void asioext::read_file |
( |
const char * |
filename, |
|
|
RawByteContainer & |
c |
|
) |
| |
Read a file into a container.
This function loads the contents of filename
into c
.
- Parameters
-
filename | The path of the file to load. |
c | The container object which shall contain the file's content. The container is resized to the file's size and any previous data is overwritten. The container type must satisfy the RawByteContainer requirements. |
- Exceptions
-
asio::system_error | Thrown on failure. |
◆ read_file() [2/16]
template<class RawByteContainer >
void asioext::read_file |
( |
const char * |
filename, |
|
|
RawByteContainer & |
c, |
|
|
error_code & |
ec |
|
) |
| |
Read a file into a container.
This function loads the contents of filename
into c
.
- Parameters
-
filename | The path of the file to load. |
c | The container object which shall contain the file's content. The container is resized to the file's size and any previous data is overwritten. The container type must satisfy the RawByteContainer requirements. |
ec | Set to indicate what error occurred. If no error occurred, the object is reset. |
◆ read_file() [3/16]
template<class RawByteContainer >
void asioext::read_file |
( |
const wchar_t * |
filename, |
|
|
RawByteContainer & |
c |
|
) |
| |
Read a file into a container.
This function loads the contents of filename
into c
.
- Parameters
-
filename | The path of the file to load. |
c | The container object which shall contain the file's content. The container is resized to the file's size and any previous data is overwritten. The container type must satisfy the RawByteContainer requirements. |
- Exceptions
-
asio::system_error | Thrown on failure. |
- Note
- Only available on Windows.
◆ read_file() [4/16]
template<class RawByteContainer >
void asioext::read_file |
( |
const wchar_t * |
filename, |
|
|
RawByteContainer & |
c, |
|
|
error_code & |
ec |
|
) |
| |
Read a file into a container.
This function loads the contents of filename
into c
.
- Parameters
-
filename | The path of the file to load. |
c | The container object which shall contain the file's content. The container is resized to the file's size and any previous data is overwritten. The container type must satisfy the RawByteContainer requirements. |
ec | Set to indicate what error occurred. If no error occurred, the object is reset. |
- Note
- Only available on Windows.
◆ read_file() [5/16]
template<class RawByteContainer >
void asioext::read_file |
( |
const boost::filesystem::path & |
filename, |
|
|
RawByteContainer & |
c |
|
) |
| |
Read a file into a container.
This function loads the contents of filename
into c
.
- Parameters
-
filename | The path of the file to load. |
c | The container object which shall contain the file's content. The container is resized to the file's size and any previous data is overwritten. The container type must satisfy the RawByteContainer requirements. |
- Exceptions
-
asio::system_error | Thrown on failure. |
- Note
- Only available if using Boost.Filesystem (i.e. if
ASIOEXT_HAS_BOOST_FILESYSTEM
is defined)
◆ read_file() [6/16]
template<class RawByteContainer >
void asioext::read_file |
( |
const boost::filesystem::path & |
filename, |
|
|
RawByteContainer & |
c, |
|
|
error_code & |
ec |
|
) |
| |
Read a file into a container.
This function loads the contents of filename
into c
.
- Parameters
-
filename | The path of the file to load. |
c | The container object which shall contain the file's content. The container is resized to the file's size and any previous data is overwritten. The container type must satisfy the RawByteContainer requirements. |
ec | Set to indicate what error occurred. If no error occurred, the object is reset. |
- Note
- Only available if using Boost.Filesystem (i.e. if
ASIOEXT_HAS_BOOST_FILESYSTEM
is defined)
◆ read_file() [7/16]
template<class RawByteContainer >
void asioext::read_file |
( |
file_handle |
file, |
|
|
RawByteContainer & |
c |
|
) |
| |
Read a file into a container.
This function loads the contents of file
into c
.
- Parameters
-
file | The file_handle object to read from. The file_handle's file pointer is expected to point at the beginning of the file. Upon completion, the file pointer points at the end. |
c | The container object which shall contain the file's content. The container is resized to the file's size and any previous data is overwritten. The container type must satisfy the RawByteContainer requirements. |
- Exceptions
-
asio::system_error | Thrown on failure. |
◆ read_file() [8/16]
template<class RawByteContainer >
Read a file into a container.
This function loads the contents of file
into c
.
- Parameters
-
file | The file_handle object to read from. The file_handle's file pointer is expected to point at the beginning of the file. Upon completion, the file pointer points at the end. |
c | The container object which shall contain the file's content. The container is resized to the file's size and any previous data is overwritten. The container type must satisfy the RawByteContainer requirements. |
ec | Set to indicate what error occurred. If no error occurred, the object is reset. |
◆ read_file() [9/16]
template<class MutableBufferSequence >
Read a file into a sequence of buffers.
This function loads the contents of filename
into buffers
.
- Parameters
-
filename | The path of the file to load. |
buffers | The sequence of buffers to read the file into. If the file size is less than the total size of all buffers, the call will fail. Otherwise the buffer is filled entirely. Trailing data is ignored. |
- Exceptions
-
asio::system_error | Thrown on failure. |
◆ read_file() [10/16]
template<class MutableBufferSequence >
Read a file into a sequence of buffers.
This function loads the contents of filename
into buffers
.
- Parameters
-
filename | The path of the file to load. |
buffers | The sequence of buffers to read the file into. If the file size is less than the total size of all buffers, the call will fail. Otherwise the buffer is filled entirely. Trailing data is ignored. |
ec | Set to indicate what error occurred. If no error occurred, the object is reset. |
◆ read_file() [11/16]
template<class MutableBufferSequence >
Read a file into a sequence of buffers.
This function loads the contents of filename
into buffers
.
- Parameters
-
filename | The path of the file to load. |
buffers | The sequence of buffers to read the file into. If the file size is less than the total size of all buffers, the call will fail. Otherwise the buffer is filled entirely. Trailing data is ignored. |
- Exceptions
-
asio::system_error | Thrown on failure. |
- Note
- Only available on Windows.
◆ read_file() [12/16]
template<class MutableBufferSequence >
Read a file into a sequence of buffers.
This function loads the contents of filename
into buffers
.
- Parameters
-
filename | The path of the file to load. |
buffers | The sequence of buffers to read the file into. If the file size is less than the total size of all buffers, the call will fail. Otherwise the buffer is filled entirely. Trailing data is ignored. |
ec | Set to indicate what error occurred. If no error occurred, the object is reset. |
- Note
- Only available on Windows.
◆ read_file() [13/16]
template<class MutableBufferSequence >
void asioext::read_file |
( |
const boost::filesystem::path & |
filename, |
|
|
const MutableBufferSequence & |
buffers |
|
) |
| |
Read a file into a sequence of buffers.
This function loads the contents of filename
into buffers
.
- Parameters
-
filename | The path of the file to load. |
buffers | The sequence of buffers to read the file into. If the file size is less than the total size of all buffers, the call will fail. Otherwise the buffer is filled entirely. Trailing data is ignored. |
- Exceptions
-
asio::system_error | Thrown on failure. |
- Note
- Only available if using Boost.Filesystem (i.e. if
ASIOEXT_HAS_BOOST_FILESYSTEM
is defined)
◆ read_file() [14/16]
template<class MutableBufferSequence >
Read a file into a sequence of buffers.
This function loads the contents of filename
into buffers
.
- Parameters
-
filename | The path of the file to load. |
buffers | The sequence of buffers to read the file into. If the file size is less than the total size of all buffers, the call will fail. Otherwise the buffer is filled entirely. Trailing data is ignored. |
ec | Set to indicate what error occurred. If no error occurred, the object is reset. |
- Note
- Only available if using Boost.Filesystem (i.e. if
ASIOEXT_HAS_BOOST_FILESYSTEM
is defined)
◆ read_file() [15/16]
template<class MutableBufferSequence >
Read a file into a sequence of buffers.
This function loads the contents of file
into c
.
- Parameters
-
file | The file_handle object to read from. The file_handle's file pointer is expected to point at the beginning of the file. Upon completion, the file pointer points at the end. |
buffers | The sequence of buffers to read the file into. If the file size is less than the total size of all buffers, the call will fail. Otherwise the buffer is filled entirely. Trailing data is ignored. |
- Exceptions
-
asio::system_error | Thrown on failure. |
◆ read_file() [16/16]
template<class MutableBufferSequence >
Read a file into a sequence of buffers.
This function loads the contents of file
into c
.
- Parameters
-
file | The file_handle object to read from. The file_handle's file pointer is expected to point at the beginning of the file. Upon completion, the file pointer points at the end. |
buffers | The sequence of buffers to read the file into. If the file size is less than the total size of all buffers, the call will fail. Otherwise the buffer is filled entirely. Trailing data is ignored. |
ec | Set to indicate what error occurred. If no error occurred, the object is reset. |