'\" t .\" Title: gfs_pio_create .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 3 Sep 2015 .\" Manual: Gfarm .\" Source: Gfarm .\" Language: English .\" .TH "GFS_PIO_CREATE" "3" "3 Sep 2015" "Gfarm" "Gfarm" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" gfs_pio_create \- create a file in the Gfarm file system .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'gfarm_error_t\ gfs_pio_create('u .BI "gfarm_error_t\ gfs_pio_create(const\ char\ *\ " "gfarm_url" ", int\ " "flags" ", gfarm_mode_t\ " "mode" ", GFS_File\ *\ " "gfp" ");" .SH "DESCRIPTION" .PP \fBgfs_pio_create()\fR creates a new file in the Gfarm file system whose name is the string pointed to by \fIgfarm_url\fR with the access mode \fImode\fR, and returns a \fIGFS_File\fR structure to the address pointed to by \fIgfp\fR\&. \fIMode\fR specifies the file permissions to be created, and is modified by the process\*(Aqs \fIumask\fR\&. .PP The \fIflags\fR argument has the same meaning as the second argument of \fBgfs_pio_open()\fR, including the point such that exactly one of \fIGFARM_FILE_RDONLY\fR, \fIGFARM_FILE_WRONLY\fR, and \fIGFARM_FILE_RDWR\fR should be specified\&. In addition, it is possible to specify \fIGFARM_FILE_EXCLUSIVE\fR\&. With this flag, \fBgfs_pio_create()\fR will fail when the file already exists\&. .PP Note that \fIGFARM_FILE_TRUNC\fR must be explicitly specified by the \fIflags\fR argument if needed\&. .SH "RETURN VALUES" .PP \fBGFARM_ERR_NO_ERROR\fR .RS 4 The function terminated successfully\&. .RE .PP \fBGFARM_ERR_IS_A_DIRECTORY\fR .RS 4 \fIgfarm_url\fR refers to a directory\&. .RE .PP \fBGFARM_ERR_IS_A_SYMBOLIC_LINK\fR .RS 4 \fIgfarm_url\fR refers to a symbolic link\&. .RE .PP \fBGFARM_ERR_OPERATION_NOT_PERMITTED\fR .RS 4 \fIgfarm_url\fR refers to not a regular file\&. .RE .PP \fBGFARM_ERR_NOT_A_DIRECTORY\fR .RS 4 A component used as a directory in \fIgfarm_url\fR is not, in fact, a directory\&. .RE .PP \fBGFARM_ERR_PERMISSION_DENIED\fR .RS 4 The requested access to the file is not allowed, or one of the directories in \fIgfarm_url\fR did not allow search (execute) permission, or the file did not exist yet and write access to the parent directory is not allowed\&. Or, the authentication to the metadata server fails\&. .RE .PP \fBGFARM_ERR_NO_MEMORY\fR .RS 4 Insufficient memory was available\&. .RE .PP \fBGFARM_ERR_INVALID_ARGUMENT\fR .RS 4 \fIflags\fR is not valid\&. .RE .PP \fBGFARM_ERR_GFARM_URL_HOST_IS_MISSING\fR .RS 4 \fIgfarm_url\fR does not include a metadata server\&. .RE .PP \fBGFARM_ERR_GFARM_URL_PORT_IS_MISSING\fR .RS 4 \fIgfarm_url\fR does not include a port number of the metadata server\&. .RE .PP \fBGFARM_ERR_UNKNOWN_HOST\fR .RS 4 The metadata server cannot be resolved\&. .RE .PP \fBGFARM_ERR_TOO_MANY_OPEN_FILES\fR .RS 4 The process opens too many files\&. .RE .PP \fBGFARM_ERR_TOO_MANY_OPEN_FILES_IN_SYSTEM\fR .RS 4 The system limit on the total number of open files has been reached\&. .RE .PP \fBGFARM_ERR_NETWORK_IS_UNREACHABLE\fR .RS 4 Network is unrechable\&. .RE .PP \fBGFARM_ERR_OPERATION_TIMED_OUT\fR .RS 4 Connetion timeout occurs\&. .RE .PP \fBGFARM_ERR_PROTOCOL\fR .RS 4 Protocol error occurs\&. .RE .PP \fBGFARM_ERR_BROKEN_PIPE\fR .RS 4 Connection to the metadata server is broken\&. .RE .PP \fBGFARM_ERR_PROTOCOL_NOT_SUPPORTED\fR .RS 4 Specified authentication protocol is not supported\&. .RE .PP \fBGFARM_ERR_AUTHENTICATION\fR .RS 4 User authentication failed when connecting to the metadata server\&. .RE .PP \fBGFARM_ERR_ALREADY_EXISTS\fR .RS 4 \fIgfarm_url\fR already exists and GFARM_FILE_EXCLUSIVE was used\&. .RE .PP Others .RS 4 An error except the above occurred\&. The reason is shown by \fBgfarm_error_string\fR(3)\&. .RE .SH "SEE ALSO" .PP \fBgfs_pio_close\fR(3), \fBgfs_pio_create\fR(3), \fBgfs_pio_eof\fR(3), \fBgfs_pio_error\fR(3), \fBgfs_pio_flush\fR(3), \fBgfs_pio_getc\fR(3), \fBgfs_pio_getline\fR(3), \fBgfs_pio_open\fR(3), \fBgfs_pio_putc\fR(3), \fBgfs_pio_putline\fR(3), \fBgfs_pio_puts\fR(3), \fBgfs_pio_read\fR(3), \fBgfs_pio_seek\fR(3), \fBgfs_pio_ungetc\fR(3), \fBgfs_pio_write\fR(3)