Content-type: text/html
Man page of GFAL_OPEN
GFAL_OPEN
Section: Library Functions (3)
Updated: $Date: 2008/12/18 13:19:12 $
Index
Return to Main Contents
NAME
gfal_open - open a file
SYNOPSIS
import os
import gfal
int gfal_open (string filename,
int flags,
int mode);
int gfal_open64 (string filename,
int flags,
int mode);
DESCRIPTION
gfal_open
opens a file according to the value of
flags.
- filename
-
specifies the file name: either a logical file name, a guid, an SURL or a TURL.
- flags
-
value is built by OR'ing the following constants:
-
- os.O_RDONLY
-
open for reading only
- os.O_WRONLY
-
open for writing only
- os.O_RDWR
-
open for reading and writing
- os.O_CREAT
-
creation of the file if needed ; if the file exists already and
os.O_EXCL
is also set,
gfal_open
will fail.
- os.O_LARGEFILE
-
allows files whose sizes cannot be represented in 31 bits to be opened.
- mode
-
is used only if the file is created.
RETURN VALUE
This routine returns the file descriptor if the operation was successful or -1
if the operation failed. In the latter case,
errno
is set appropriately.
ERRORS
- ENOENT
-
The named file does not exist.
- EACCES
-
Search permission is denied on a component of the
filename
prefix or the file does not exist and write permission on the parent directory
is denied or the file exists and
flags
permission on the file itself is denied.
- EFAULT
-
filename
is a NULL pointer.
- EBUSY
-
Device or resource busy. Happens if you try to open in write mode a CASTOR file that is in an active migration stream.
- ENOTDIR
-
A component of
filename
prefix is not a directory.
- EINVAL
-
filename
has an invalid syntax.
- ECOMM
-
Communication error.
- EPROTONOSUPPORT
-
Access method not supported.
SEE ALSO
gfal_python(3),
gfal_init_python(3),
gfal_internal_free_python(3),
gfal_deletesurls_python(3),
gfal_removedir_python(3),
gfal_get_python(3),
gfal_getstatus_python(3),
gfal_ls_python(3),
gfal_pin_python(3),
gfal_prestage_python(3),
gfal_prestagestatus_python(3),
gfal_release_python(3),
gfal_abortrequest_python(3),
gfal_abortfiles_python(3),
gfal_set_xfer_done_python(3),
gfal_set_xfer_running_python(3),
gfal_turlsfromsurls_python(3),
gfal_get_ids_python(3),
gfal_set_ids_python(3),
gfal_get_results_python(3),
gfal_access_python(3),
gfal_chmod_python(3),
gfal_close_python(3),
gfal_closedir_python(3),
gfal_creat_python(3),
gfal_get_timeout_connect_python(3),
gfal_get_timeout_sendreceive_python(3),
gfal_get_timeout_bdii_python(3),
gfal_get_timeout_srm_python(3),
gfal_set_timeout_connect_python(3),
gfal_set_timeout_sendreceive_python(3),
gfal_set_timeout_bdii_python(3),
gfal_set_timeout_srm_python(3),
gfal_lseek_python(3),
gfal_mkdir_python(3),
gfal_open_python(3),
gfal_opendir_python(3),
gfal_read_python(3),
gfal_rename_python(3),
gfal_rmdir_python(3),
gfal_stat_python(3),
gfal_unlink_python(3),
gfal_write_python(3),
gfal_set_verbose_python(3),
gfal_get_errno_python(3),
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- ERRORS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 14:16:31 GMT, July 14, 2009