System.CloseFile
Delphi
procedure CloseFile(var F: File);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure | public | System.pas | System | System |
Description
Terminates the association between a file variable and an external disk file.
Due to naming conflicts, CloseFile replaces the Close procedure. Use the CloseFile procedure instead of Close to terminate the association between a file variable and an external disk file.
F is a file variable of any file type opened using Reset, Rewrite, or Append. The external file associated with F is completely updated and then closed, freeing the file handle for reuse.
Note: {$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.
See Also