It is primarily a convenience for users to allow wildcards in filenames and pointers to files containing lists of names. The template is a list of filenames, patterns, or list filenames. String substitution may also be used to form new filenames. That is, a file containing regular filenames. String substitution uses the first string given for the template, expands the template, and for each filename generated by the template, substitutes the second string to generate a new filename.
Some examples follow.
The remaining lower level routines expand a template on the fly and do not permit sorting or determination of the length of the list.