IniLikeFile

Ini-like file.

Constructors

this
this()

Construct empty IniLikeFile, i.e. without any groups or values

this
this(string fileName, ReadOptions options)

Read from file.

this
this(Range byLine, ReadOptions options, string fileName)

Read from range of IniLikeLines.

Members

Aliases

SaveDelegate
alias SaveDelegate = void delegate(string)

Alias for saving delegate.

Enums

ReadOptions
enum ReadOptions

Flags to manage .ini like file reading

Functions

addFirstComment
void addFirstComment(string line)
Undocumented in source. Be warned that the author may not have intended to support it.
addGroup
IniLikeGroup addGroup(string groupName)

Create new group using groupName.

byGroup
auto byGroup()

Range of groups in order how they were defined in file.

fileName
string fileName()

File path where the object was loaded from.

firstComments
auto firstComments()
Undocumented in source. Be warned that the author may not have intended to support it.
group
inout(IniLikeGroup) group(string groupName)

Get group by name.

isValidKey
bool isValidKey(string key)

Tell whether the string is valid key. For IniLikeFile the valid key is any non-empty string. Reimplement this function in the derived class to throw exception from IniLikeGroup when key is invalid.

removeGroup
void removeGroup(string groupName)

Remove group by name.

save
void save(SaveDelegate sink)

Use delegate to retrieve strings line by line. Those strings can be written to the file or be showed in text area. Note: returned strings don't have trailing newline character.

saveToFile
void saveToFile(string fileName)

Save object to the file using .ini-like format.

saveToString
string saveToString()

Save object to string using .ini like format.

Meta