Difference between revisions of "TIniFile"

From Soldat Community Wiki
Jump to: navigation, search
(new page, god damnit)
 
 
(2 intermediate revisions by one other user not shown)
Line 5: Line 5:
  
 
Class used to work with .ini files<br>
 
Class used to work with .ini files<br>
Can be created with [[TFile.CreateINI]]<br>
+
Can be created with [[TFile.CreateINI]]
'''Don't forget to free the instance after using it!'''
 
 
   
 
   
  User constructable: '''YES'''
+
  User constructable: '''NO'''
 
  User destructable:  '''YES'''
 
  User destructable:  '''YES'''
  
Line 52: Line 51:
 
|  
 
|  
 
|-
 
|-
| function [[TIniFile.ReadBinaryStream|ReadBinaryStream]](const Section, Name: string; Value: [[TSream]]): Integer
+
| function [[TIniFile.ReadBinaryStream|ReadBinaryStream]](const Section, Name: string; Value: [[TStream]]): Integer
 
|  
 
|  
 
|-
 
|-
Line 114: Line 113:
 
| align="center" | RW  
 
| align="center" | RW  
 
|-
 
|-
| property [[TIniFile.CacheUpdate|CacheUpdate]]: Boolean
+
| property [[TIniFile.CacheUpdates|CacheUpdates]]: Boolean
 
| align="center" | RW
 
| align="center" | RW
 
|-
 
|-

Latest revision as of 20:57, 16 June 2018

Inheritance

Description

Class used to work with .ini files
Can be created with TFile.CreateINI

User constructable: NO
User destructable:  YES

Members

Member declaration Access mode
procedure Free
function SectionExists(const Section: string): Boolean
function ReadString(const Section, Ident, Default: string): string
procedure WriteString(const Section, Ident, Value: string)
function ReadInteger(const Section, Ident: string; Default: Longint): Longint
procedure WriteInteger(const Section, Ident: string; Value: Longint)
function ReadBool(const Section, Ident: string; Default: Boolean): Boolean
procedure WriteBool(const Section, Ident: string; Value: Boolean)
function ReadDate(const Section, Ident: string; Default: TDateTime): TDateTime
function ReadDateTime(const Section, Ident: string; Default: TDateTime): TDateTime
function ReadFloat(const Section, Ident: string; Default: Double): Double
function ReadTime(const Section, Ident: string; Default: TDateTime): TDateTime
function ReadBinaryStream(const Section, Name: string; Value: TStream): Integer
procedure WriteDate(const Section, Ident: string; Value: TDateTime)
procedure WriteDateTime(const Section, Ident: string; Value: TDateTime)
procedure WriteFloat(const Section, Ident: string; Value: Double)
procedure WriteTime(const Section, Ident: string; Value: TDateTime)
procedure WriteBinaryStream(const Section, Name: string; Value: TStream)
procedure ReadSection(const Section: string; Strings: TStrings)
procedure ReadSections(Sections: TStrings)
procedure ReadSectionValues(const Section: string; Strings: TStrings)
procedure EraseSection(const Section: string)
procedure DeleteKey(const Section, Ident: String)
procedure UpdateFile
function ValueExists(const Section, Ident: string): Boolean
procedure Clear
procedure GetStrings(List: TStrings)
procedure Rename(const AFileName: string; Reload: Boolean)
procedure SetStrings(List: TStrings)
property FileName: string R
property CaseSensitive: Boolean RW
property StripQuotes: Boolean RW
property CacheUpdates: Boolean RW