petsc-3.7.1 2016-05-15
Report Typos and Errors

PetscGetFileFromPath

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

Synopsis

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

Input Parameters

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

Output Parameter

fname -qualified file name Many br

Many br

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

Level:developer
Location:
src/sys/fileio/ffpath.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages