rfio_open man page

RFIO_OPEN(3) Rfio Library Functions RFIO_OPEN(3)

[1mNAME[0m
rfio_open - opens a file

[1mSYNOPSIS[0m
[1m#include <sys/types.h>[0m
[1m#include "rfio_api.h"[0m

[1mint rfio_open (const char *[4m[22mpath[24m[1m, int [4m[22mflags[24m[1m, int [4m[22mmode[24m[1m);[0m

Under Linux, for large files:
[1m#define _LARGEFILE64_SOURCE[0m
[1m#include <sys/types.h>[0m
[1m#include "rfio_api.h"[0m

[1mint rfio_open64 (const char *[4m[22mpath[24m[1m, int [4m[22mflags[24m[1m, int [4m[22mmode[24m[1m);[0m

For large files, under other systems:
[1m#include <sys/types.h>[0m
[1m#include "rfio_api.h"[0m

[1mint rfio_open64 (const char *[4m[22mpath[24m[1m, int [4m[22mflags[24m[1m, int [4m[22mmode[24m[1m);[0m

[1mDESCRIPTION[0m
[1mrfio_open [22mopens the file whose name is the string pointed to by [1mpath[22m, a
character string containing the filename specification, and associates
a FILE stream with it.
[1mflags [22mare formed by ORing the following values:

O_RDONLY Open for reading only
O_WRONLY Open for writing only
O_RDWR Open for reading and writing
O_NDELAY Do not block on open
O_APPEND Append on each write
O_CREAT Create file if it does not exist
O_TRUNC Truncate size to 0
O_EXCL Error if create and file exists
O_LARGEFILE When size can be superior to 2GB-1.
See NOTES

[1mmode [22mspecifies the permission bits to be set if the file is created.

Opening a file with O_APPEND set causes each write on the file to be
appended to the end. If O_TRUNC is specified and the file exists, the
file is truncated to zero length. If O_EXCL is set with O_CREAT, then
if the file already exists, the open returns an error. This can be
used to implement a simple exclusive access locking mechanism. If
O_EXCL is set and the last component of the pathname is a symbolic
link, the open will succeed even if the symbolic link points to an
existing name. If the O_NDELAY flag is specified and the open call
would result in the process being blocked for some reason (for example
waiting for a carrier on a dial-up line), the open returns immediately.
The first time the process attempts to perform IO on the open file, it
will block (not currently implemented). On systems that support the
Large Files, O_LARGEFILE in rfio_open allows files whose sizes cannot
be represented in 31 bits to be opened.

[1mRETURN VALUE[0m
If successful, returns a non-negative integer which may be used to
refer to the file on subsequent [1mrfio_write[22m, [1mrfio_read [22mand [1mrfio_close[0m
calls. On failure, [1mrfio_open [22mreturns -1 and the error code is stored
in serrno.

[1mERRORS[0m
[1mENOENT [22mThe named file/directory does not exist or is a null path-
name.

[1mEACCES [22mSearch permission is denied on a component of the [4mpath[0m
prefix.

[1mEBUSY [22mDevice or resource busy. Happens if you try to open in
write mode a LCG file that is in an active migration
stream.

[1mEFAULT [4m[22mpath[24m is a NULL pointer.

[1mENOTDIR [22mA component of [4mpath[24m prefix is not a directory.

[1mENAMETOOLONG [22mThe length of [4mpath[24m exceeds [1mCA_MAXPATHLEN [22mor the length of
a [4mpath[24m component exceeds [1mCA_MAXNAMELEN[22m.

[1mSENOSHOST [22mHost unknown.

[1mSENOSSERV [22mService unknown.

[1mSECOMERR [22mCommunication error.

[1mSEE ALSO[0m
[1mCastor_limits(4)[22m,[1mrfio_write(3)[22m,[1mrfio_read(3)[22m,[1mrfio_close(3)[0m

[1mNOTES[0m
On Irix, Tru64 and IA64 the 64 bit mode is the default one, open and
open64 are identical. The [4mflag[24m O_LARGEFILE is accepted on Irix and IA64
(where it has no effect) but not on Tru64. On all other platforms,
rfio_open with O_LARGEFILE is equivalent to a call to rfio_open64.

[1mAUTHOR[0m
[1mLCG Grid Deployment [22mTeam

LCG $Date: 2005/03/31 13:13:03 $ RFIO_OPEN(3)

Referenced By

rfio_open64(3) is an alias of rfio_open(3).