9 #ifndef largeFileFunctions_H_
10 #define largeFileFunctions_H_
15 #include <vlutil/vlMachineTypes.h>
34 static DtFileDesc openForReading(
const DtFilename& filename,
bool randomAccess );
39 static DtFileDesc openForWriting(
const DtFilename& filename,
bool truncate =
true);
44 static DtFileDesc openForReadingAndWriting(DtFilename filename,
45 bool truncate =
false,
bool randomAccess =
true);
60 static DtInt64 seekCurrent(
DtFileDesc,DtInt64);
75 static size_t read(
DtFileDesc,
void* buffer,
size_t bytesToRead);
86 size_t desiredSize =
sizeof(T);
88 return readSize == desiredSize;
97 static char* readBytes(
DtFileDesc,
size_t bytesToRead,
size_t& totalBytesRead);
103 static size_t write(
DtFileDesc,
const void* buffer,
size_t bytesToWrite);
111 template <
typename T>
114 size_t desiredSize =
sizeof(T);
116 return writeSize == desiredSize;
static bool writeStruct(DtFileDesc fd, const T &structObject)
Write a structure to the file.
Definition: largeFileFunctions.h:112
static size_t read(DtFileDesc, void *buffer, size_t bytesToRead)
Read data from the file into the supplied buffer.
#define DT_DLL_LGRUTIL
Definition: lgrUtil.h:19
static bool readStruct(DtFileDesc fd, T &structObject)
Read a structure from the file.
Definition: largeFileFunctions.h:84
Provides an interface for large (64bit) File IO.
Definition: largeFileFunctions.h:27
static size_t write(DtFileDesc, const void *buffer, size_t bytesToWrite)
Write the data from the buffer into the file.
Contains IMPORT/EXPORT macros for lgrUtil library.
int DtFileDesc
Definition: largeFileFunctions.h:21