CatapultServer
v0.5.0.1 (Elephant)
|
Wrapper for low-level i/o operations on files.
Definition: RawFile.h:49
Open file for both reading and writing. Removes the file if it exists.
int m_fd
Definition: RawFile.h:94
int raw() const
Definition: RawFile.cpp:267
Open file in read-only mode.
void seek(uint64_t position)
Definition: RawFile.cpp:320
LockMode
Defines locking mode for the file.
Definition: RawFile.h:40
OpenMode
Defines mode of opening the file.
Definition: RawFile.h:28
~FileDescriptorHolder()
Definition: RawFile.cpp:256
uint64_t position() const
Returns position in the file.
Definition: RawFile.cpp:338
BasicRawBuffer< uint8_t > MutableRawBuffer
A mutable binary buffer.
Definition: RawBuffer.h:65
std::string Message
Definition: RawFile.cpp:72
uint64_t size() const
Returns size of the file.
Definition: RawFile.cpp:334
uint64_t m_position
Definition: RawFile.h:100
RawFile(const std::string &pathname, OpenMode mode, LockMode lockMode=LockMode::File)
Definition: RawFile.cpp:293
uint64_t size
Definition: MemoryCounters.cpp:65
T Value
Definition: RawFile.cpp:69
A class that can be moved but not copied.
Definition: NonCopyable.h:43
bool IsSuccess
Definition: RawFile.cpp:68
RawFile & operator=(RawFile &&rhs)=delete
Disallow move-assign.
FileDescriptorHolder(int fd)
Definition: RawFile.cpp:249
Open file for both reading and writing.
Definition: AddressExtractionExtension.cpp:28
int & rawRef()
Definition: RawFile.cpp:274
const std::string m_pathname
Definition: RawFile.h:97
void write(const RawBuffer &dataBuffer)
Definition: RawFile.cpp:305
bool isValid() const
Definition: RawFile.cpp:263
void read(const MutableRawBuffer &dataBuffer)
Definition: RawFile.cpp:313
int32_t ErrorCode
Definition: RawFile.cpp:71
FileDescriptorHolder m_fd
Definition: RawFile.h:98
FileDescriptorHolder & operator=(FileDescriptorHolder &&rhs)=delete
uint64_t m_fileSize
Definition: RawFile.h:99
BasicRawBuffer< const uint8_t > RawBuffer
A const binary buffer.
Definition: RawBuffer.h:62