libixp

git clone git://oldgit.suckless.org/libixp/
Log | Files | Refs | LICENSE

ixp_open.3 (2250B)


      1 .TH "IXP_OPEN" 3 "2010 Jun" "libixp Manual"
      2 
      3 .SH NAME
      4 .P
      5 ixp_open, ixp_create, IxpCFid, IxpOMode
      6 
      7 .SH SYNOPSIS
      8 .nf
      9   #include <ixp.h>
     10   
     11   IxpCFid *ixp_open(IxpClient *c, const char *path, uchar mode);
     12   
     13   IxpCFid *ixp_create(IxpClient *c, const char *path, uint perm, uchar mode);
     14   
     15   typedef struct IxpCFid IxpCFid;
     16   struct IxpCFid {
     17           uint32_t        fid;
     18           IxpQid          qid;
     19           uint8_t         mode;
     20           uint            open;
     21           uint            iounit;
     22           uint32_t        offset;
     23           IxpClient*      client;
     24   
     25           /* Private members */
     26           ...
     27   }
     28   
     29   enum IxpOMode {
     30           P9_OREAD        = 0,    /* open for read */
     31           P9_OWRITE       = 1,    /* write */
     32           P9_ORDWR        = 2,    /* read and write */
     33           P9_OEXEC        = 3,    /* execute, == read but check execute permission */
     34           P9_OTRUNC       = 16,   /* or'ed in (except for exec), truncate file first */
     35           P9_OCEXEC       = 32,   /* or'ed in, close on exec */
     36           P9_ORCLOSE      = 64,   /* or'ed in, remove on close */
     37           P9_ODIRECT      = 128,  /* or'ed in, direct access */
     38           P9_ONONBLOCK    = 256,  /* or'ed in, non-blocking call */
     39           P9_OEXCL        = 0x1000,       /* or'ed in, exclusive use (create only) */
     40           P9_OLOCK        = 0x2000,       /* or'ed in, lock after opening */
     41           P9_OAPPEND      = 0x4000        /* or'ed in, append only */
     42   }
     43 .fi
     44 
     45 .SH PARAMETERS
     46 .TP
     47 path
     48 The path of the file to open or create.
     49 .TP
     50 perm
     51 The permissions with which to create the new
     52 file. These will be ANDed with those of the
     53 parent directory by the server.
     54 .TP
     55 mode
     56 The file's open mode.
     57 
     58 .SH DESCRIPTION
     59 .P
     60 ixp_open and ixp_create each open a file at IpathR.
     61 ImodeR must include OREAD, OWRITE, or ORDWR, and may
     62 include any of the modes specified in \fBIxpOMode(3)\fR.
     63 ixp_create, additionally, creates a file at IpathR if it
     64 doesn't already exist.
     65 
     66 .SH RETURN VALUE
     67 .P
     68 A pointer on which to operate on the newly
     69 opened file.
     70 
     71 .SH SEE ALSO
     72 .P
     73 ixp_mount(3), ixp_read(3), ixp_write(3), ixp_print(3),
     74 ixp_fstat(3), ixp_close(3)
     75 
     76 
     77 .\" man code generated by txt2tags 2.5 (http://txt2tags.sf.net)
     78 .\" cmdline: txt2tags -o- ixp_open.man3
     79