Addons/general/inifiles

From J Wiki
Jump to navigation Jump to search
User Guide | Installation | Development | Categories | Git | Build Log

general/inifiles - INI file utilities

  • Provides verbs to read from and write to INI files or strings in INI file format.
  • Uses regex functionality built into J and is therefore usable on all platforms (not reliant on the Windows API).
  • Provides similar functionality to that provided by Windows API PrivateProfile functions (e.g. GetPrivateProfileStringA) and more.
  • Verbs can source the INI information from a file stored on disk, or a string that might have been read from a zip file or a database.
  • Verbs support array arguments for retrieving, updating or writing multiple INI keys at once.
  • An INI key can be returned as a string or interpreted as a numeric or boxed list.

Browse source and examples in github.

Installation

Use JAL/Package Manager.

Usage

Load inifiles addon with the following line

   load 'general/inifiles'

To see the sampler of usage, run the test script].

  • Open the script open 'general/inifiles/test'
  • Select all contents using Ctrl+A
  • Run Selection using Ctrl+E

Here is typical session output from the test.ijs script.

Authors

See Also

IniFiles script - Cover verbs for Windows API functions dealing with INI files.