TFile.FileOpen constructor
Constructor FileOpen(FileName: string);
Call FileOpen to initialize a file variable. FileName is a string-type expression or an expression of type PChar if extended syntax is enabled.
TFile.FileOpenDay constructor
Constructor FileOpenDay(FileName: string);
Call FileOpenDay to initialize a file variable. FileName is a string-type expression or an expression of type PChar if extended syntax is enabled.
The filename is the name of the file without specifying the path. The path is automaticly assigned to the actual day of the month. Exemple:
January 10, 2001 the path will be: C:\VK-WinQV\WQVFiles\Report\2001\January\10\
TFile.FileOpenMonth constructor
Constructor FileOpenMonth(FileName: string);
Call FileOpenMonth to initialize a file variable. FileName is a string-type expression or an expression of type PChar if extended syntax is enabled.
The filename is the name of the file without specifying the path. The path is automaticly assigned to the actual month of the year. Exemple:
January 10, 2001 the path will be: C:\VK-WinQV\WQVFiles\Report\2001\January\
TFile.FileClose
Procedure FileClose;
Use the CloseFile procedure to terminate the association between a file variable and an external disk file.
The external file is completely updated and then closed.
TFile.FileErase
Procedure FileErase;
Erase deletes the external file .
Exemple:
F:=FileOpenDay(‘Report.txt’);
F.FileErase;
F.free;
TFile.FileWrite;
Procedure FileWrite(v1,v2..vn);
Write writes a file to a file component. Each v is a variable of any type . For each variable written, the current file position is advanced to the next component. If the current file position is at the end of the file , the file is expanded.
Exemple:
F:=FileOpenDay(‘Variable.dat’);
F.FileWrite(vitesse1,vitesse2,switch3);
F.FileClose;
F.free;
TFile.FileRead;
Procedure FileRead(v1,v2..vn);
Read reads all characters up to, but not including, the next end-of-line marker or until Eof(F) becomes True; it does not skip to the next line after reading. After the first Read, each subsequent Read sees the end-of-line marker and returns a zero-length string.