ゴミ箱
|
#include <file_stdio.hpp>
Public Types | |
using | native_handle_type = FILE * |
Public Member Functions | |
~file_stdio () | |
file_stdio ()=default | |
file_stdio (file_stdio &&other) | |
file_stdio & | operator= (file_stdio &&other) |
FILE * | native_handle () const |
Returns the native handle associated with the file. More... | |
void | native_handle (FILE *f) |
bool | is_open () const |
Returns true if the file is open. More... | |
void | close (error_code &ec) |
void | open (char const *path, file_mode mode, error_code &ec) |
std::uint64_t | size (error_code &ec) const |
std::uint64_t | pos (error_code &ec) const |
void | seek (std::uint64_t offset, error_code &ec) |
std::size_t | read (void *buffer, std::size_t n, error_code &ec) const |
std::size_t | write (void const *buffer, std::size_t n, error_code &ec) |
An implementation of File which uses cstdio.
This class implements a file using the interfaces present in the C++ Standard Library, in <stdio>
.
using boost::beast::file_stdio::native_handle_type = FILE* |
The type of the underlying file handle.
This is platform-specific.
|
inline |
Destructor
If the file is open it is first closed.
|
default |
Constructor
There is no open file initially.
|
inline |
Constructor
The moved-from object behaves as if default constructed.
|
inline |
Close the file if open
ec | Set to the error, if any occurred. |
|
inline |
Returns true
if the file is open.
|
inline |
Returns the native handle associated with the file.
|
inline |
Set the native handle associated with the file.
If the file is open it is first closed.
f | The native file handle to assign. |
|
inline |
Open a file at the given path with the specified mode
path | The utf-8 encoded path to the file |
mode | The file mode to use |
ec | Set to the error, if any occurred |
|
inline |
Assignment
The moved-from object behaves as if default constructed.
|
inline |
Return the current position in the open file
ec | Set to the error, if any occurred |
|
inline |
Read from the open file
buffer | The buffer for storing the result of the read |
n | The number of bytes to read |
ec | Set to the error, if any occurred |
|
inline |
Adjust the current position in the open file
offset | The offset in bytes from the beginning of the file |
ec | Set to the error, if any occurred |
|
inline |
Return the size of the open file
ec | Set to the error, if any occurred |
|
inline |
Write to the open file
buffer | The buffer holding the data to write |
n | The number of bytes to write |
ec | Set to the error, if any occurred |