TEFile - implements basic file operations |
|||
| Constructor | TEFile TEFile(const TEString &F, const TEString &Attribs) |
||
| Function | returns | arguments | |
| void Flush | void | Flushes buffer associated with the write operation on a file to the file | |
| Handle | FILE * | Returns a handle to a file. FILE is usually defined in stdio.h | |
| Length | int | Returns Length of the file | |
| bool Open | bool | const TEString &F const TEString &Attribs |
Opens a file according to the fopen functions defined in stdio.h |
| int Read | int | void *Bf int count |
Read from a file to Bf count bytes |
| int Seek | int | int Position int From |
Changes the position from which I/O operations start to a specified positions. For details see lseek and seek functions defined in stdio.h or io.h |
| int Write | int | void *Bf int count |
Writes count bytes from Bf to file |
| int Write | int | const TEString &S | Writes a string to the file |
| int Writenl | int | const TEString &S | Writes a string to a file and adds "\r\n" sequence after |
| int Write | int | char *bf | Writes a char* string to a file |
TEFiles: implements basic functions to work with file names |
|||
| Function | returns | arguments | |
| static FileExists | bool | const TEString &F | returns true if a file exists and false otherwise |
| static DelFile(); |
bool | const TEString &F | Deletes a file. Note that the function removes a read-only attribute before. |
| static ExtractFilePath | TEString | const TEString &F | Returns a folder path of a file including the trailing backslash (if exists) |
| static ExtractFileExt | TEString | const TEString &F | Returns the file extension (without the '.' character) |
| static ExtractFileName |
TEString | const TEString &F | Returns the name of a file |
| static ChangeFileExt | TEString | const TEString &F const TEString &Extension |
Changes file's extension to a specified one |
©
Oleg V. Dolomanov, 2004
Last Updated 2004.03.30