ini

Creator: coderz1093

Last updated:

Add to Cart

Description:

ini

Dart INI #
This library deals with reading and writing ini files. This implements the standard as defined here:
https://en.wikipedia.org/wiki/INI_file
The ini file reader will return data organized by section and option. The default section will be the blank string.
Examples #
Read a file:
import "package:ini/ini.dart";

new File("config.ini").readAsLines()
.then((lines) => new Config.fromStrings(lines))
.then((Config config) => ...);
copied to clipboard
Write a file:
new File("config.ini").writeAsString(config.toString());
copied to clipboard
Read options:
// List all sections in the configuration, excluding default.
config.sections();

// List options within a section
config.options("default");
config.options("section");
config.hasSection("section");

// List of key value pairs for a section.
config.items("section");

// Read specific options.
config.get("section", "option");
config.hasOption("section", "option");
copied to clipboard
Write options:
// Make sure you add sections before using them.
config.addSection("section");

config.set("section", "option", "value");

config.removeSection("section");

config.removeOption("section", "option");
copied to clipboard
There is example code in the example/ directory.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.