mura

Class IniFile

lucee.Component
    extended by mura.IniFile

This provides a utility to read ini files

Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Constructor Summary
    init(string iniPath)
    Method Summary
    any cleanIni()
    any get([string section], [string entry], [string default])
         Get all INI data (no arguments); a section's data, as a struct (one argument, section name); or an entry's value (section and entry name arguments).
    struct getSections()
         Returns a struct with section names and values set to list of section entry names.
    any set(string section, string entry, [any value=''])
    any setSection(string section)
    private boolean startsWith(string str, string char)
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(string iniPath)

    Parameters:
    iniPath - Mapped Path to an ini file.

    Method Detail

    cleanIni

    public any cleanIni()


    get

    public any get([string section], [string entry], [string default])

    Get all INI data (no arguments); a section's data, as a struct (one argument, section name); or an entry's value (section and entry name arguments). Optionally pass a third argument to set/get a default value if requested entry doesn't exist.

    Parameters:
    section - Section name.
    entry - Entry name.
    default

    getSections

    public struct getSections()

    Returns a struct with section names and values set to list of section entry names. This behaves much like the CF built-in function getProfileSections().


    set

    public any set(string section, string entry, [any value=''])

    Parameters:
    section - Section name.
    entry - Entry name.
    value - Property value

    setSection

    public any setSection(string section)

    Parameters:
    section - Section name.

    startsWith

    private boolean startsWith(string str, string char)

    Parameters:
    str - String to check.
    char - Character to check for.