gfs_pio_create - create a Gfarm file
char *gfs_pio_create (char * gfarm_url, int flags, mode_t mode,
GFS_File * gfp);
gfs_pio_create() creates a new Gfarm file whose name is the string
pointed to by gfarm_url with the access mode mode, and returns a
GFS_File structure to the address pointed to by gfp. Mode specifies
the file permissions to be created, and is modified by the process’s
The flags argument has the same meaning as the second argument of
gfs_pio_open(), including the point such that exactly one of
GFARM_FILE_RDONLY, GFARM_FILE_WRONLY, and GFARM_FILE_RDWR should be
specified. In addition, it is possible to specify
GFARM_FILE_EXCLUSIVE. With this flag, gfs_pio_create() will fail when
the file already exists.
Note that GFARM_FILE_TRUNC must be explicitly specified by the flags
argument since gfarm-1.0.4, if it’s needed. Although this was
implicitly assumed before.
When gfs_pio_create() is used by parallel processes executed by
gfrun(3) or gfmpirun_p4(3), each process should specify a consistent
value for mode. The returned GFS_File structure of each process has
individual file pointers among parallel processes.
NULL The function terminated successfully.
Insufficient memory was available.
User authentication failed when connecting to gfmd(8) or
The requested access to the file is not allowed, or one of the
directories in gfarm_url did not allow search (execute)
permission, or the file did not exist yet and write access to
the parent directory is not allowed.
gfarm_url already exists and GFARM_FILE_EXCLUSIVE was used.
gfarm_url refers to a directory.
A component used as a directory in gfarm_url does not exist.
A component used as a directory in gfarm_url is not, in fact, a
Others An error except the above occurred. The reason is shown by its
gfs_pio_close(3), gfs_pio_create(3), gfs_pio_eof(3), gfs_pio_error(3),
gfs_pio_flush(3), gfs_pio_getc(3), gfs_pio_getline(3), gfs_pio_open(3),
gfs_pio_putc(3), gfs_pio_putline(3), gfs_pio_puts(3), gfs_pio_read(3),
gfs_pio_seek(3), gfs_pio_set_view_index(3), gfs_pio_set_view_local(3),