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


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

Abstract ini file object


Source position: inifiles.pp line 152

type TCustomIniFile = class


  FormatSettings: TFormatSettings;


Format settings to use when reading date/time/float values

  constructor Create();


Instantiate a new instance of TCustomIniFile.

  destructor Destroy; override;


Remove the TCustomIniFile instance from memory

  procedure SetBoolStringValues();


Set the boolean string values to use when writing to file

  function SectionExists(); virtual;


Check if a section exists.

  function ReadString(); virtual; abstract;


Read a string valued key

  procedure WriteString(); virtual; abstract;


Write a string value

  function ReadInteger(); virtual;


Read an integer value from the file

  procedure WriteInteger(); virtual;


Write an integer value

  function ReadInt64(); virtual;


Read an Int64 value

  procedure WriteInt64(); virtual;


Write an Int64 value.

  function ReadBool(); virtual;


  procedure WriteBool(); virtual;


Write boolean value

  function ReadDate(); virtual;


Read a date value

  function ReadDateTime(); virtual;


Read a Date/Time value

  function ReadFloat(); virtual;


Read a floating point value

  function ReadTime(); virtual;


Read a time value

  function ReadBinaryStream(); virtual;


Read binary data

  procedure WriteDate(); virtual;


Write date value

  procedure WriteDateTime(); virtual;


Write date/time value

  procedure WriteFloat(); virtual;


Write a floating-point value

  procedure WriteTime(); virtual;


Write time value

  procedure WriteBinaryStream(); virtual;


Write binary data

  procedure ReadSection(); virtual; abstract;


Read the key names in a section

  procedure ReadSections(); virtual; abstract;


Read the list of sections

  procedure ReadSectionValues();


Read names and values of a section

  procedure EraseSection(); virtual; abstract;


Clear a section

  procedure DeleteKey(); virtual; abstract;


Delete a key from a section

  procedure UpdateFile; virtual; abstract;


Update the file on disk

  function ValueExists(); virtual;


Check if a value exists

  property Encoding: TEncoding; [rw]


Encoding of the ini file.

  property FileName: string; [r]


Name of the .ini file

  property Options: TIniFileOptions; [rw]


Options currently in effect

  property EscapeLineFeeds: Boolean; [r] deprecated ;


Should linefeeds be escaped ?

  property CaseSensitive: Boolean; [rw] deprecated ;


Are key and section names case sensitive

  property StripQuotes: Boolean; [rw] deprecated ;


Should quotes be stripped from string values

  property FormatSettingsActive: Boolean; [rw] deprecated ;


Is FormatSettings used or not

  property BoolTrueStrings: TStringArray; [rw]


Strings to recognize as boolean True values.

  property BoolFalseStrings: TStringArray; [rw]


Strings to recognize as boolean False values.

  property OwnsEncoding: Boolean; [r]


Does the ini file instance own the encoding ?





Abstract ini file object




TCustomIniFile implements all calls for manipulating a .ini. It does not implement any of this behaviour, the behaviour must be implemented in a descendent class like TIniFile or TMemIniFile.

Since TCustomIniFile is an abstract class, it should never be created directly. Instead, one of the TIniFile or TMemIniFile classes should be created.

See also



Ini file implementation



Inifile cached in memory

Documentation generated on: May 14 2021