Go to the documentation of this file.
38 #ifndef BLOCXX_FILE_BUF_HPP_INCLUDE_GUARD_
39 #define BLOCXX_FILE_BUF_HPP_INCLUDE_GUARD_
40 #include "blocxx/BLOCXX_config.h"
58 class FileBuf :
public BaseStreamBuffer
119 FileBuf*
open(
const char* path, std::ios_base::openmode mode, mode_t permissions = 0666);
virtual int buffer_from_device(char *c, int n)
Fill the buffer from the "device".
FileBuf * close()
If isOpen() == false, returns a null pointer.
FileBuf & operator=(const FileBuf &arg)
int cppModeToPOSIXMode(std::ios_base::openmode cppMode)
Converts C++ iostream open mode to POSIX io open mode.
FileBuf * open(FILE *fp)
If isOpen() == true, returns 0, otherwise initializes the FileBuf to use fp.
const char * cppModeToCMode(std::ios_base::openmode cppMode)
Converts C++ iostream open mode to C stdio file open mode or the empty string on error (never returns...
AutoResource< AutoDescriptorPolicy > AutoDescriptor
An analog of std::auto_ptr for descriptors.
std::ios_base::openmode posixModeToCppMode(int posixMode)
Converts POSIX io open mode flags to C++ iostream open mode.
virtual int buffer_to_device(const char *c, int n)
Writes the buffer to the "device".