---
name: "open_rw"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/open_rw"
---

# open\_rw(3)

open a file for reading and writing

## NAME

open\_rw - open a file for reading and writing

## SYNTAX

**#include \<libowfat/open.h\>**

int **open\_rw**(const char \**filename*);

## DESCRIPTION

open\_rw opens the file *filename* for reading and writing use and returns the file handle.  If the file does not exist, it will be created with mode 0644.  If there was an error opening or creating the file, open\_rw returns -1 and sets errno accordingly.

## SEE ALSO

[open(2)](/open/2.md)
