#include <TFile.hh>
Public Types | |
enum | Seek { SET, CUR, END } |
Starting point used when seeking in file. More... | |
Public Methods | |
TFile () | |
Default constructor. | |
TFile (const TString &path, const TString &mode) | |
Open the specified file. | |
~TFile () | |
Closes any open file. | |
void | Close () |
Close any open file. | |
bool | GetMap (void *&start, long &length) |
Get address and length of mapped memory. | |
bool | IsValid () |
Query if a file is open. | |
long | Length () |
Return the current length of the file. | |
void * | Map () |
Map file into memory. | |
void * | Map (long offset, long length) |
Map file into memory. | |
void | UnMap () |
Un map previously mapped memory. | |
bool | Open (const TString &path, const TString &mode) |
Open the specified file. | |
TString | Path () |
Path name as recorded in the object regardless of its state. | |
long | Read (void *buf, long count) |
Read bytes from file. | |
long | Seek (long offset, enum Seek whence=SET) |
Seek in file. | |
void | Sync () |
Move all modified data and attributes of the file to the storage device. | |
bool | Write (const TFile &file) |
Write other file to file. | |
bool | Write (const TString &str) |
Write string to file. | |
long | Write (const void *buf, long count) |
Write data to file. |
FIXME: Add copy operator and reference counting.
|
Starting point used when seeking in file.
|
|
Open the specified file. Use IsValid() to check for validity.
|
|
Get address and length of mapped memory.
|
|
Query if a file is open.
|
|
Return the current length of the file.
|
|
Map file into memory. Reading or writing past the current length of the file it not allowed. Also, mappging is only guaranteed to work if the file has been opened with read only or read and write permissions.
|
|
Map file into memory. Reading or writing past the current length of the file it not allowed. Also, mappging is only guaranteed to work if the file has been opened with read only or read and write permissions.
|
|
Open the specified file.
|
|
Path name as recorded in the object regardless of its state.
|
|
Read bytes from file.
|
|
Seek in file.
|
|
Move all modified data and attributes of the file to the storage device. This call blocks until the operation is completed. |
|
Write data to file.
|
|
Write string to file.
|
|
Write other file to file. The file position of file is not rewinded.
|