License:
BSD style: see license.txt

Version:
Initial release: May 2004

author:
Kris

Deprecated:
Please use tango.io.stream.MapStream instead

  • class Properties (T);
  • Provides load facilities for a properties file. That is, a file or other medium containing lines of text with a name=value layout.

  • void load (FilePath path, void delegate(T[] name, T[] value) dg);
  • Load properties from the named file, and pass each of them to the provided delegate.

  • void load (char[] path, void delegate(T[] name, T[] value) dg);
  • Load properties from the named file, and pass each of them to the provided delegate.

    Since:
    0.99.7



  • void load (InputStream stream, void delegate(T[] name, T[] value) dg);
  • Load properties from the provided buffer, and pass them to the specified delegate.

    We use an iterator to sweep text lines, and extract lValue and rValue pairs from each one, The expected file format is as follows:

                    x = y
                    abc = 123
                    x.y.z = this is a single property
    
                    # this is a comment line
    


  • void save (FilePath path, T[][T[]] properties);
  • Write properties to the provided filepath

  • void save (char[] path, T[][T[]] properties);
  • Write properties to the provided filepath

    Since:
    0.99.7



  • void save (OutputStream stream, T[][T[]] properties);
  • Write properties to the provided stream

    Copyright (c) 2004 Kris Bell. All rights reserved :: page rendered by CandyDoc