INI file Definition
Https://en.wikipedia.org/wiki/INI_file
TheINI FileFormat is an informal standard for configuration files for some platforms or software. ini files are simple text files with a basic structure composed of sections, properties, and values. [1]
The INI file format is an informal configuration file standard for some software and platforms.
The INI file is a simple text file with a basic structure consisting of Section property and value.
In MS-DOS and 16-bit Windows platforms up through Windows ME, The INI file served as the primary mechanic to configure operating system and installed applications features, such as device drivers, fonts, startup launchers, and things that needed to be initialized in Booting Windows. INI files were also generally used by applications to store their individual settings. [2]
Starting with Windows NT, Microsoft favored the use of the registry, and began to steer developers away from using INI files for configuration. all subsequent versions of Windows have used the Windows registry for system configuration, and applications built on. net Framework use special XML. config files. the APIS still exist in windows, however, and developers may still use them.
Configure the operating system and installed software features, such as the device driver, Font, boot launcher, and other parameters used during startup, in the early versions of Microsoft.
Later, starting from nt, Microsoft used the registry, configured the operating system, and the application software used XML file configuration. Fewer and fewer ini are used.
The name "INI file" comes from the commonly used filename extension.INI
, Which stands for "initialization". Other common initialization file extensions are.CFG
,.conf
, [3] and.TXT
, [4] EspeciallyCONFIG.SYS
And 'config.txt 'occurrences.
Linux and UNIX systems also use a similar file format for system configuration. in addition, platform-agnostic software may use this file format for configuration. it is human-readable and simple to parse, so it is a usable format for configuration files that do not require much greater complexity.
The INI file comes from the commonly used file suffix. ini, indicating initialization. Linux is also used. It is easy to read and simple.
Format
Https://en.wikipedia.org/wiki/INI_file
Keys (properties)
The basic element contained in an INI file isKeyOrProperty. Every key hasNameAndValue, Delimited by an equals sign (=
). The name appears to the left of the equals sign.
Note: In the Windows implementationKeyCannot contain the characters equal sign (=
) Or semi colon (;
) As these are reserved characters.ValueCan contain any character.
name=value
Sections
Keys may (but need not) be grouped into arbitrarily namedSections. The section name appears on a line by itself, in square brackets ([
And]
). All keys after the section Declaration are associated with that section. there is no explicit "end of section" delimiter; sections end at the next section declaration, or the end of the file. sections may not be nested.
Note: In the Windows implementationSectionCannot contain the character closing bracket (]
).
[section]a=ab=b
Case insensiti.pdf
Section and property names are not case sensitive in the Windows implementation. [8]
Comments
Semicolons (;
) At the beginning of the line indicate a comment. Comment lines are ignored.
; comment text
Https://www.cnblogs.com/renyuan/p/4111695.html
The INI file consists of segments, keys, and values.
Section
[Section]
Parameters(Key = value)
Name = Value
Annotation
The annotation uses a semicolon (;). All the text after the semicolon until the end of the line is annotation.
The format of the Ni file is very simple. The three basic elements are parameters, sections, and comments.
What is parameters?
The most basic "element" contained in INI is parameter. Each parameter has a name and a value. The name and value are separated by the equal sign "=. Name is on the left of the equal sign.
For example:
Name = Value
What is sections?
All parameters are combined in units of sections. All section names are exclusive to one row, and their names are surrounded by square brackets ([and]). All parameters after section declaration belong to this section. There is no obvious ending mark for a section. The beginning of a section is the end of the previous section, or the end of the file. In general, sections cannot be nested. In special cases, sections nesting can also be implemented.
Section:
[Section]
What is comments?
In the INI file, the Comment statement starts with the Semicolon. All comment statements are exclusive to one row until the end, no matter how long. All contents between the semicolon and the line terminator are ignored.
The annotation example is as follows:
; Comments text
Non GNU ini
Http://www.nongnu.org/chmspec/latest/INI.html
INI files are text files with CRLF line endings. They are divided into uniquely named sections. The beginning each of section is denoted by a line of the following form :"[Section Type] "WhereSection TypeIs a series of words. Each section type is followed by lines up to the next section that specify data for that section and each different section type may have a different format.
There are two main types of format following the section type: each line isVariable = Value[, Value]… Each line is a just an EOL terminated string.
The following variables are used below in the description of values in the different format descriptions:
- Bool
-
Yes|No
- Decimal number
-
(0|1|2|3|4|5|6|7|8|9)...
- Hex number
-
0x(0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|A|B|C|D|E|F)...
- Number
-
Hex number|Decimal number
- String
-
Any character (usually alphanumerics plus underscore) repeated up to the terminator (usually EOL, also '=' or '"')
- Path
-
SimilarString, But a file with the same name shocould exist
INI File Format