MySQL 8.0.39
Source Code Documentation
|
FILE_IO : Wrapper around std::fstream 1> Provides READ/WRITE handle to a file 2> Records error on READ/WRITE operations 3> Closes file before destruction. More...
Public Member Functions | |
File_IO (const File_IO &src) | |
File_IO & | operator= (const File_IO &src) |
~File_IO () | |
void | close () |
const Sql_string_t & | file_name () const |
bool | read_mode () const |
bool | get_error () const |
void | set_error () |
void | reset_error () |
File_IO & | operator>> (Sql_string_t &s) |
Read an open file. More... | |
File_IO & | operator<< (const Sql_string_t &output_string) |
Write into an open file. More... | |
Protected Member Functions | |
File_IO ()=default | |
File_IO (const Sql_string_t filename, bool read) | |
File_IO (const Sql_string_t filename, MY_MODE mode) | |
A constructor to create the class with the right umask mode. More... | |
void | file_open () |
bool | file_is_open () |
Private Attributes | |
Sql_string_t | m_file_name |
bool | m_read |
bool | m_error_state |
File | m_file |
Friends | |
class | File_creator |
FILE_IO : Wrapper around std::fstream 1> Provides READ/WRITE handle to a file 2> Records error on READ/WRITE operations 3> Closes file before destruction.
|
inline |
|
inline |
|
protecteddefault |
|
inlineprotected |
|
inlineprotected |
A constructor to create the class with the right umask mode.
filename | name of the file |
mode | the create attributes to pass to my_create() |
|
inline |
|
inlineprotected |
|
inline |
|
inlineprotected |
|
inline |
File_IO & File_IO::operator<< | ( | const Sql_string_t & | output_string | ) |
Write into an open file.
[in] | output_string | Content to be written |
Assumption : string must be non-empty.
File_IO & File_IO::operator>> | ( | Sql_string_t & | s | ) |
Read an open file.
[out] | s | String buffer |
Assumption : Caller will free string buffer
|
inline |
|
inline |
|
inline |
|
friend |
|
private |
|
private |
|
private |
|
private |