[Overview][Classes][Index] | Reference for unit 'IniFiles' (#fcl)

# TIniFile

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Ini file implementation

## Declaration

Source position: inifiles.pp line 162

`type TIniFile = class(TCustomIniFile)`
`protected`
`procedure MaybeUpdateFile;`
`property Dirty: Boolean; [r]`
`public`
`procedure Create();` |  | Create a new instance of TIniFile
`destructor Destroy; override;` |  | Remove the TIniFile instance from memory
`function ReadString(); override;` |  | Read a string
`procedure WriteString(); override;` |  | Write string to file
`procedure ReadSection(); override;` |  | Read the key names in a section
`procedure ReadSectionRaw();` |  | Read raw section
`procedure ReadSections(); override;` |  | Read section names
`procedure ReadSectionValues(); override;` |  |
`procedure EraseSection(); override;` |  |
`procedure DeleteKey(); override;` |  | Delete key
`procedure UpdateFile; override;` |  | Update the file on disk
`property Stream: TStream; [r]` |  | Stream from which ini file was read
`property CacheUpdates: Boolean; [rw]` |  | Should changes be kept in memory
`end;`

## Inheritance

`TIniFile` |  | Ini file implementation
`TCustomIniFile` |  | Abstract ini file object
`TObject`

## Description

TIniFile is an implementation of TCustomIniFile which does the same as TMemIniFile, namely it reads the whole file into memory. Unlike TMemIniFile it does not cache updates in memory, but immediatly writes any changes to disk.

TIniFile introduces no new methods, it just implements the abstract methods introduced in TCustomIniFile

## See also

TCustomIniFile |  | Abstract ini file object
TMemIniFile |  | Inifile cached in memory

The latest version of this document can be found at lazarus-ccr.sourceforge.net .