# PetscGetWorkingDirectory
Gets the current working directory. 
## Synopsis
```
PetscErrorCode PetscGetWorkingDirectory(char path[], size_t len)
```
Not Collective


## Input Parameters

- ***len  -*** maximum length of path



## Output Parameter

- ***path -*** use to hold the result value. The string should be long enough
to hold the path.





## See Also
 `PetscGetTmp()`, `PetscSharedTmp()`, `PetscSharedWorkingDirectory()`, `PetscGetHomeDirectory()`

## Level
developer

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/fileio/fwd.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)  
