gfal_creat(3) - Linux man page
Name
gfal_creat - create a new file or truncate an existing oneSynopsis
int gfal_creat (const char *filename, mode_t mode);
Under Linux, for large files:
#define _LARGEFILE64_SOURCE
#include "gfal_api.h"
int gfal_creat64 (const char *filename, mode_t mode);
For large files, under other systems:
#include "gfal_api.h"
int gfal_creat64 (const char *filename, mode_t mode);
Description
gfal_creat creates a new file or truncates an existing one.- filename
- specifies the file name: either a logical file name, a guid, an SURL or a TURL.
- mode
- is used only if the file is created.
gfal_creat (filename, mode) is equivalent to:
open(filename, O_WRONLY | O_CREAT | O_TRUNC, mode)
Return Value
This routine returns a write-only file descriptor if the operation was successful or -1 if the operation failed. In the latter case, errno is set appropriately.Errors
- 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 write 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.