.TH "IXP_OPEN" 3 "2012 Dec" "libixp Manual" .SH NAME .P ixp_open, ixp_create, IxpCFid, IxpOMode .SH SYNOPSIS .nf #include IxpCFid *ixp_open(IxpClient *c, const char *path, uint8_t mode); IxpCFid *ixp_create(IxpClient *c, const char *path, uint perm, uint8_t mode); typedef struct IxpCFid IxpCFid; struct IxpCFid { uint32_t fid; IxpQid qid; uint8_t mode; uint open; uint iounit; uint32_t offset; IxpClient* client; /* Private members */ ... } enum IxpOMode { P9_OREAD = 0, /* open for read */ P9_OWRITE = 1, /* write */ P9_ORDWR = 2, /* read and write */ P9_OEXEC = 3, /* execute, == read but check execute permission */ P9_OTRUNC = 16, /* or'ed in (except for exec), truncate file first */ P9_OCEXEC = 32, /* or'ed in, close on exec */ P9_ORCLOSE = 64, /* or'ed in, remove on close */ P9_ODIRECT = 128, /* or'ed in, direct access */ P9_ONONBLOCK = 256, /* or'ed in, non-blocking call */ P9_OEXCL = 0x1000, /* or'ed in, exclusive use (create only) */ P9_OLOCK = 0x2000, /* or'ed in, lock after opening */ P9_OAPPEND = 0x4000 /* or'ed in, append only */ } .fi .SH PARAMETERS .TP path The path of the file to open or create. .TP perm The permissions with which to create the new file. These will be ANDed with those of the parent directory by the server. .TP mode The file's open mode. .SH DESCRIPTION .P ixp_open and ixp_create each open a file at \fIpath\fR. \fImode\fR must include OREAD, OWRITE, or ORDWR, and may include any of the modes specified in \fBIxpOMode(3)\fR. ixp_create, additionally, creates a file at \fIpath\fR if it doesn't already exist. .SH RETURN VALUE .P A pointer on which to operate on the newly opened file. .SH SEE ALSO .P ixp_mount(3), ixp_read(3), ixp_write(3), ixp_print(3), ixp_fstat(3), ixp_close(3) .\" man code generated by txt2tags 2.6 (http://txt2tags.org) .\" cmdline: txt2tags -o- ixp_open.man3