| Name: | searchfile - tries to open a file for reading using one of
the pathes given within an array of pathnames.
|
| Synopsis: | (filename) [pathnames] searchfile -> istream true
-> false
|
| Description: |
searchfile concatenates every pathname with the filename and
calls ifstream until ifstream was able to open the file or until no
other path is left. In ordinary cases you will not call searchfile,
but searchifstream. Call searchfile if you want to use customized
search pathes.
|
| Diagnostics: |
The routine issues debugging messages of priority M_DEBUG
displaying the search status.
|
| Parameters: |
string is the filename, while array contains pathname strings.
|
| Examples: | test.dat [(./) (~/) (/home/synod/)] tries to open test.dat for
reading using the current, your user, and the /home/synod/ path one
after the other. It opens the first test.dat found along the way,
or returns false if there is no one in neither path.
|
| References: |
|
| Bugs: |
|
| Author: | Gewaltig, Diesmann, R Kupper
|
| FirstVersion: | 1995
|
| Remarks: | commented April 13, 1999 Hehl
added debugging output 4-dec-2007 R Kupper
| SeeAlso: | ifstream searchifstream LocateFileNames |
|
| Source: | /home/abuild/rpmbuild/BUILD/nest-2.4.1/lib/sli/sli-init.sli
|