# PetscGetRelativePath
Given a filename, returns the relative path (removes all directory specifiers). 
## Synopsis
```
PetscErrorCode PetscGetRelativePath(const char fullpath[], char path[], size_t flen)
```
Not Collective


## Input parameters

- ***fullpath  -*** full pathname
- ***path      -*** pointer to buffer to hold relative pathname
- ***flen     -*** size of path





## See Also
 `PetscGetFullPath()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/fileio/rpath.c.html#PetscGetRelativePath">src/sys/fileio/rpath.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/fileio/rpath.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
