Package Overview

The File package provides utility functions for working with directories and files. By using these functions, provided by the Programming support library, your code will compile on all supported platforms.

Within the File package are a number of prg_file_parse… functions, which are used to parse ASCII configuration files of the form:

start_<block name1>
	key1:value1
	key2:value2
	...
end_<block_name1>
start_<block name2>
	...
end_<block_name2>

These types of files are often used to store user preferences, and the prg_file_parse… functions provide routines to read and deconstruct these types of files. In general terms, the file is considered to contain a collection of named blocks (the name follows the start_ and end_ prefixes) and each block contains a set of entries. Each entry is of the form:

<key> : <value>

Functions are provided to read in and parse the files, and then to obtain information from the parsed data (such as number of blocks, number of blocks of a specific name, number of entries in a block, and information about each entry in a specific block).