Config.save

Saves the field's values into a file. If none is given the values are saved in the same file they have been loaded from (if the load method has been called), otherwise the file is not saved.

  1. void save(string file)
  2. void save()
    struct Config(E...)
    void
    save
    (
    string sep = ":"
    string mod = __MODULE__
    )
    ()
    if (
    areValidArgs!E
    )

Throws

FileException on file error

Examples

example.save("example.txt");
example.save("dir/test.txt");
assert(read("example.txt") == read("dir/test.txt"));

Meta