Provides an interface for large (64bit) File IO. More...
Static Public Member Functions | |
| static DtFileDesc | openForReading (const DtFilename &filename) |
| Open a file for reading. | |
| static DtFileDesc | openForWriting (const DtFilename &filename, bool truncate=true) |
| Open a file for writing. | |
| static DtFileDesc | openForReadingAndWriting (DtFilename filename, bool truncate=false) |
| Open a file for reading and writing. | |
| static bool | close (DtFileDesc) |
| Closes the file. | |
| static DtInt64 | size (DtFileDesc) |
| Gets the size of the file in bytes. | |
| static DtInt64 | tell (DtFileDesc) |
| Get the current position in the file. | |
| static DtInt64 | seekCurrent (DtFileDesc, DtInt64) |
| Set the current position relative to it's current position. | |
| static DtInt64 | seekEnd (DtFileDesc, DtInt64) |
| Set the current position relative to the end of the file. | |
| static DtInt64 | seekSet (DtFileDesc, DtInt64) |
| Set the current position relative to the beginning of the file. | |
| static size_t | read (DtFileDesc, void *buffer, size_t bytesToRead) |
| Read data from the file into the supplied buffer. | |
| template<typename T > | |
| static bool | readStruct (DtFileDesc fd, T &structObject) |
| Read a structure from the file. | |
| static char * | readBytes (DtFileDesc, size_t bytesToRead, size_t &totalBytesRead) |
| Read data into a newly created buffer. | |
| static size_t | write (DtFileDesc, const void *buffer, size_t bytesToWrite) |
| Write the data from the buffer into the file. | |
| template<typename T > | |
| static bool | writeStruct (DtFileDesc fd, const T &structObject) |
| Write a structure to the file. | |
Provides an interface for large (64bit) File IO.
| static bool MAKLogger::DtLargeFileFunctions::close | ( | DtFileDesc | ) | [static] |
Closes the file.
| true | The close succeeded. |
| false | The close failed. |
| static DtFileDesc MAKLogger::DtLargeFileFunctions::openForReading | ( | const DtFilename & | filename | ) | [static] |
Open a file for reading.
| 0 | Unable to open file for reading. |
| static DtFileDesc MAKLogger::DtLargeFileFunctions::openForReadingAndWriting | ( | DtFilename | filename, |
| bool | truncate = false |
||
| ) | [static] |
Open a file for reading and writing.
| 0 | Unable to open file for reading and writing. |
| static DtFileDesc MAKLogger::DtLargeFileFunctions::openForWriting | ( | const DtFilename & | filename, |
| bool | truncate = true |
||
| ) | [static] |
Open a file for writing.
| 0 | Unable to open file for writing. |
| static size_t MAKLogger::DtLargeFileFunctions::read | ( | DtFileDesc | , |
| void * | buffer, | ||
| size_t | bytesToRead | ||
| ) | [static] |
Read data from the file into the supplied buffer.
Referenced by readStruct().
| static char* MAKLogger::DtLargeFileFunctions::readBytes | ( | DtFileDesc | , |
| size_t | bytesToRead, | ||
| size_t & | totalBytesRead | ||
| ) | [static] |
Read data into a newly created buffer.
| NULL | If the file does not support reading. |
| static bool MAKLogger::DtLargeFileFunctions::readStruct | ( | DtFileDesc | fd, |
| T & | structObject | ||
| ) | [inline, static] |
Read a structure from the file.
This function assumes the file data maps directly into the structure. This function will also work with built-in types.
References read().
| static DtInt64 MAKLogger::DtLargeFileFunctions::seekCurrent | ( | DtFileDesc | , |
| DtInt64 | |||
| ) | [static] |
Set the current position relative to it's current position.
| static DtInt64 MAKLogger::DtLargeFileFunctions::seekEnd | ( | DtFileDesc | , |
| DtInt64 | |||
| ) | [static] |
Set the current position relative to the end of the file.
| static DtInt64 MAKLogger::DtLargeFileFunctions::seekSet | ( | DtFileDesc | , |
| DtInt64 | |||
| ) | [static] |
Set the current position relative to the beginning of the file.
| static size_t MAKLogger::DtLargeFileFunctions::write | ( | DtFileDesc | , |
| const void * | buffer, | ||
| size_t | bytesToWrite | ||
| ) | [static] |
Write the data from the buffer into the file.
Referenced by writeStruct().
| static bool MAKLogger::DtLargeFileFunctions::writeStruct | ( | DtFileDesc | fd, |
| const T & | structObject | ||
| ) | [inline, static] |
Write a structure to the file.
This function assumes the file data maps directly into the structure. This function will also work with built-in types.
References write().