# PetscBinaryOpen

Opens a PETSc binary file.

### Synopsis

    #include "petsc.h"
    PetscErrorCode PETSC_DLLEXPORT PetscBinaryOpen(const char name[],int type,int *fd)

Not Collective

### Input Parameters

| name | - filename
| type | - type of binary file, on of PETSC_FILE_RDONLY, PETSC_FILE_WRONLY, PETSC_FILE_CREATE

### Output Parameter

fd -the file

Notes: Files access with PetscBinaryRead() and PetscBinaryWrite() are ALWAYS written in big-endian format. This means the file can be accessed using PetscBinaryOpen() and PetscBinaryRead() and PetscBinaryWrite() on any machine.

### See Also

PetscBinaryRead(), PetscBinaryWrite()

Level:advanced
Location:src/sys/src/fileio/sysio.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages