lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
File class that allows for raw read/write operations on a given file. More...
#include <raw_file.h>
Public Member Functions | |
LEAN_MAYBE_EXPORT | raw_file (const utf8_ntri &name, uint4 access=file::read|file::write, open_mode mode=file::open, uint4 hints=file::none, uint4 share=file::share_default) |
Opens the given file according to the given flags. Throws a runtime_exception on error. | |
LEAN_MAYBE_EXPORT | ~raw_file () |
Closes this file. | |
LEAN_MAYBE_EXPORT size_t | read (char *begin, size_t count) const |
Reads the given number of bytes from the file, returning the number of bytes read. This method is thread-safe. | |
LEAN_MAYBE_EXPORT size_t | write (const char *begin, size_t count) |
Writes the given number of bytes to the file, returning the number of bytes written. This method is thread-safe. | |
LEAN_MAYBE_EXPORT size_t | print (const char_ntri &message) |
Prints the given range of characters to the file. This method is thread-safe. |
File class that allows for raw read/write operations on a given file.