:orphan: # PetscGetHomeDirectory Returns the name of the user's home directory ## Synopsis ``` PetscErrorCode PetscGetHomeDirectory(char dir[], size_t maxlen) ``` Not Collective ## Input Parameter - ***maxlen -*** maximum length allowed ## Output Parameter - ***dir -*** contains the home directory. Must be long enough to hold the name. ## Notes If PETSc cannot determine the home directory it makes `dir` an empty string On Microsoft Windows machines the environmental variable `HOME` specifies the home directory. ## See Also `PetscGetTmp()`, `PetscSharedTmp()`, `PetscGetWorkingDirectory()` ## Level developer ## Location src/sys/fileio/ghome.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/fileio/ghome.c) [Index of all Sys routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)