|
| | stc_file (stc *stc, const std::string &filename=std::string()) |
| | Constructor. More...
|
| |
|
| ~stc_file () |
| | Destructor.
|
| |
|
auto | ex_stream () |
| | The ex stream (used if in ex mode).
|
| |
|
bool | is_contents_changed () const override |
| | Returns whether contents have been changed.
|
| |
|
void | reset_contents_changed () override |
| | Resets contents changed.
|
| |
|
| file () |
| | Default constructor.
|
| |
|
| file (const path &p) |
| | Constructor taking a path.
|
| |
|
| file (const path &p, std::ios_base::openmode mode) |
| | Constructor taking a path, opens the file.
|
| |
|
| file (const char *filename) |
| | Constructor taking a filename.
|
| |
|
| file (const char *filename, std::ios_base::openmode mode) |
| | Constructor taking a filename, opens the file.
|
| |
|
| file (const file &rhs) |
| | Copy constructor.
|
| |
|
virtual | ~file () |
| | Destructor.
|
| |
|
file & | operator= (const file &f) |
| | Assignment operator.
|
| |
| bool | check_sync () |
| | Checks whether this file can be synced, and syncs (invokes do_file_load) the file if so. More...
|
| |
|
bool | close () |
| | Closes the file.
|
| |
|
bool | file_load (const path &p) |
| | Sets the path, opens the file if asked for, invokes do_file_load, and closes the file again (unless use_stream was invoked).
|
| |
|
bool | file_new (const path &p) |
| | Sets the path and invokes do_file_new.
|
| |
|
bool | file_save (const path &p=path()) |
| | Sets the path if path is ok, opens the file if asked for, invokes do_file_save, and closes the file again.
|
| |
|
const path & | get_filename () const |
| | Returns the path.
|
| |
|
bool | is_open () const |
| | Returns true if file is open.
|
| |
|
bool | is_written () const |
| | Returns true if file has been written.
|
| |
|
bool | open (std::ios_base::openmode mode=std::ios_base::in) |
| | Opens current path.
|
| |
|
bool | open (const path &p, std::ios_base::openmode mode=std::ios_base::in) |
| | Opens specified path.
|
| |
|
void | put (char c) |
| | Writes char.
|
| |
|
const std::string * | read (std::streampos seek_position=0) |
| | Reads this file into a buffer.
|
| |
|
std::fstream & | stream () |
| | Returns stream.
|
| |
|
void | use_stream (bool use=true) |
| | Default file is closed after loading, if you call this method, stream remains open.
|
| |
|
bool | write (const char *s, size_t n) |
| | Writes file from buffer.
|
| |
|
bool | write (const std::string &s) |
| | Writes file from string.
|
| |
Adds file read and write to stc.