In file No file:

string find_ancillary_file (string pathname, string ext, string dir, string file)

Find a file with ancillary data.

Documentation

This function accepts a dataset path name, and searches for a matching ancillary data file name with a very specific set of search rules, given here: \begin{verbatim} directory filename extension same same `.'given given same `.'given same given `.'given given given `.'given \end{verbatim} Where ``same'' refers to the input dataset pathname, and ``given'' refers to the function arguments. For example, If you call this function with a dataset name of #/a/data#, an extension of #das#, a directory of #b#, and a filename of #ralph#, the function will look (in order) for the following files: \begin{verbatim} /a/data.das /b/data.das /a/ralph.das /b/ralph.das \end{verbatim} The function will return a string containing the name of the first file in the list that exists, if any.
Returns:
A string containing the pathname of the file found by searching with the given components. If no file was found, the null string is returned.
Parameters:
pathname - The input pathname of a dataset.
ext - The input extension the desired file is to have.
dir - The input directory in which the desired file may be found.
file - The input filename the desired file may have.

alphabetic index hierarchy of classes


generated by doc++