Method FromFile
- Namespace
- Sisk.IniConfiguration.Core
- Assembly
- Sisk.IniConfiguration.Core.dll
FromFile(string, Encoding?, bool)
Creates an new IniDocument document from the specified file using the specified encoding.
public static IniDocument FromFile(string filePath, Encoding? encoding = null, bool throwIfNotExists = true)
Parameters
filePath
stringThe absolute or relative file path to the INI document.
encoding
EncodingOptional. The encoding used to read the file. Defaults to UTF-8.
throwIfNotExists
boolOptional. Defines whether this method should throw if the specified file doens't exists or return an empty INI document.