# PetscViewerFileGetMode

Gets the type of file to be open

### Synopsis

    #include "petsc.h"
    PetscErrorCode PETSC_DLLEXPORT PetscViewerFileGetMode(PetscViewer viewer,PetscFileMode *type)

Collective on PetscViewer

### Input Parameter

viewer -the PetscViewer; must be a binary, Matlab, hdf, or netcdf PetscViewer

### Output Parameter

type -type of file

       FILE_MODE_WRITE - create new file for binary output

       FILE_MODE_READ - open existing file for binary input

       FILE_MODE_APPEND - open existing file for binary output

### See Also

PetscViewerFileSetMode(), PetscViewerCreate(), PetscViewerSetType(), PetscViewerBinaryOpen()

Level:advanced
Location: src/sys/viewer/impls/binary/binv.c
Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages