---
name: "lamf_rfopen"
section: "2"
platform: "linux"
package: "lam2-dev"
version: "6.3.2-3"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/lamf_rfopen"
---

# lamf\_rfopen(2)

Open or close a remote file. (LAM)

## NAME

lamf\_rfopen, lamf\_rfclose - Open or close a remote file. (LAM)

## SYNOPSIS

```
subroutine lamf_rfopen (udesc, filename, flags, mode, ierror)
character filename*(*)
integer udesc, flags, mode, ierror
subroutine lamf_rfclose (udesc, ierror)
integer udesc, ierror
```

## DESCRIPTION

These functions provide access to underlying POSIX functions, [open(2)](/open/2.md) and [close(2)](/close/2.md), on any LAM node. See [lam\_rfposix(2)](/lam_rfposix/2.md).

For convenience, the common POSIX open flags and additional LAM open flags are defined in \<FREQ.h\>. See [CONSTANTS(5)](/CONSTANTS/5.md) for the precise values. The flags can be added together.

- LAM\_O\_RDONLY

  Open for reading only.

- LAM\_O\_WRONLY

  Open for writing only.

- LAM\_O\_RDWR

  Open for reading and writing.

- LAM\_O\_APPEND

  Append on each write.

- LAM\_O\_CREAT

  Create the file if it does not exist.

- LAM\_O\_TRUNC

  Truncate the file length to 0.

- LAM\_O\_EXCL

  Report an error if trying to create an existing file.

- LAM\_O\_REUSE

  Reuse existing file descriptor opened with same file name, if possible.

## SEE ALSO

[lamf\_rfread(2)](/lamf_rfread/2.md), [lamf\_rfwrite(2)](/lamf_rfwrite/2.md)
