25 #ifndef COMMON_WRITEFILE_H 26 #define COMMON_WRITEFILE_H 30 #include <boost/noncopyable.hpp> 64 size_t write(
const void *dataPtr,
size_t dataSize);
83 #endif // COMMON_WRITEFILE_H size_t write(const void *dataPtr, size_t dataSize)
Write data into the stream.
A class holding an UTF-8 string.
std::FILE * _handle
The actual file handle.
bool open(const UString &fileName)
Try to open the file with the given fileName.
bool isOpen() const
Checks if the object opened a file successfully.
Basic writing stream interfaces.
Low-level type definitions to handle fixed width types portably.
size_t seek(ptrdiff_t offset, Origin whence=SeekableWriteStream::kOriginBegin)
Seek to the speciied offset from the specified origin.
void flush()
Commit any buffered data to the underlying channel or storage medium; unbuffered streams can use the ...
void close()
Close the file, if open.
Origin
The position a seeking offset takes as a base.
A simple streaming file writing class.
size_t size() const
Return the number of bytes written to the current file in total.
Seek from the begin of the stream.
size_t pos() const
Return the current position ot the stream in the file.