# PetscGetFileFromPath

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

### Synopsis

    int 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

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