PetscFileMode#

Access mode for a file.

Synopsis#

Values#

  • FILE_MODE_UNDEFINED - initial invalid value

  • FILE_MODE_READ - open a file at its beginning for reading, string value "read"

  • FILE_MODE_WRITE - open a file at its beginning for writing (will create if the file does not exist), string value "write"

  • FILE_MODE_APPEND - open a file at end for writing, string value "append"

  • FILE_MODE_UPDATE - open a file for updating, meaning for reading and writing, string value "update"

  • FILE_MODE_APPEND_UPDATE - open a file for updating, meaning for reading and writing, at the end, string value "append_update"

See Also#

PetscViewerFileSetMode()

Level#

beginner

Location#

include/petscsystypes.h

Examples#

src/sys/classes/viewer/tutorials/ex1.c
src/dm/impls/plex/tutorials/ex19.c

Examples#

src/ksp/ksp/tutorials/ex72.c
src/snes/tutorials/ex30.c
src/ksp/ksp/tutorials/ex42.c
src/ksp/ksp/tutorials/ex54f.F90
src/ksp/ksp/tutorials/ex43.c
src/mat/tutorials/ex16.c
src/vec/vec/tutorials/ex6f.F90
src/snes/tutorials/ex16.c
src/snes/tutorials/ex15.c
src/ksp/ksp/tutorials/ex70.c

Examples#

src/ksp/ksp/tutorials/ex75f.F90
src/snes/tutorials/ex12.c
src/mat/tutorials/ex16.c
src/mat/tutorials/ex12.c
src/ksp/pc/tutorials/ex4.c
src/mat/tutorials/ex10.c
src/mat/tutorials/ex1.c


Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages