petsc-3.7.6 2017-04-24
Report Typos and Errors


Finds a file from a name and a path string. A default can be provided.


PetscErrorCode  PetscGetFileFromPath(char *path,char *defname,char *name,char *fname,char mode)
Not Collective

Input Parameters

path - A string containing "directory:directory:..." (without the quotes, of course). As a special case, if the name is a single FILE, that file is used.
defname - default name
name - file name to use with the directories from env
mode - file mode desired (usually r for readable, w for writable, or e for executable)

Output Parameter

fname -qualified file name

Developer Notes: Wrongly returns 1 as an error code sometimes. Maybe should have additional flag argument indicating if it found it. Most arguments likely should be const.

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages