ixp_stat.3 (3090B)
1 .TH "IXP_STAT" 3 "2010 Jun" "libixp Manual" 2 3 .SH NAME 4 .P 5 ixp_stat, ixp_fstat, IxpStat, IxpQid, IxpQType, IxpDMode 6 7 .SH SYNOPSIS 8 .nf 9 #include <ixp.h> 10 11 IxpStat *ixp_stat(IxpClient *c, const char *path); 12 13 IxpStat *ixp_fstat(IxpCFid *fid); 14 15 typedef struct IxpStat IxpStat; 16 struct IxpStat { 17 uint16_t type; 18 uint32_t dev; 19 IxpQid qid; 20 uint32_t mode; 21 uint32_t atime; 22 uint32_t mtime; 23 uint64_t length; 24 char* name; 25 char* uid; 26 char* gid; 27 char* muid; 28 } 29 30 typedef struct IxpQid IxpQid; 31 struct IxpQid { 32 uint8_t type; 33 uint32_t version; 34 uint64_t path; 35 /* Private members */ 36 ... 37 } 38 39 enum IxpQType { 40 P9_QTDIR = 0x80, /* type bit for directories */ 41 P9_QTAPPEND = 0x40, /* type bit for append only files */ 42 P9_QTEXCL = 0x20, /* type bit for exclusive use files */ 43 P9_QTMOUNT = 0x10, /* type bit for mounted channel */ 44 P9_QTAUTH = 0x08, /* type bit for authentication file */ 45 P9_QTTMP = 0x04, /* type bit for non-backed-up file */ 46 P9_QTSYMLINK = 0x02, /* type bit for symbolic link */ 47 P9_QTFILE = 0x00 /* type bits for plain file */ 48 } 49 50 enum IxpDMode { 51 P9_DMEXEC = 0x1, /* mode bit for execute permission */ 52 P9_DMWRITE = 0x2, /* mode bit for write permission */ 53 P9_DMREAD = 0x4, /* mode bit for read permission */ 54 55 #define P9_DMDIR 0x80000000 /* mode bit for directories */ 56 #define P9_DMAPPEND 0x40000000 /* mode bit for append only files */ 57 #define P9_DMEXCL 0x20000000 /* mode bit for exclusive use files */ 58 #define P9_DMMOUNT 0x10000000 /* mode bit for mounted channel */ 59 #define P9_DMAUTH 0x08000000 /* mode bit for authentication file */ 60 #define P9_DMTMP 0x04000000 /* mode bit for non-backed-up file */ 61 #define P9_DMSYMLINK 0x02000000 /* mode bit for symbolic link (Unix, 9P2000.u) */ 62 #define P9_DMDEVICE 0x00800000 /* mode bit for device file (Unix, 9P2000.u) */ 63 #define P9_DMNAMEDPIPE 0x00200000 /* mode bit for named pipe (Unix, 9P2000.u) */ 64 #define P9_DMSOCKET 0x00100000 /* mode bit for socket (Unix, 9P2000.u) */ 65 #define P9_DMSETUID 0x00080000 /* mode bit for setuid (Unix, 9P2000.u) */ 66 #define P9_DMSETGID 0x00040000 /* mode bit for setgid (Unix, 9P2000.u) */ 67 } 68 .fi 69 70 .SH PARAMETERS 71 .TP 72 path 73 The path of the file to stat. 74 .TP 75 fid 76 An open file descriptor to stat. 77 78 .SH DESCRIPTION 79 .P 80 Stats the file at IpathR or pointed to by IfidR. 81 82 .SH RETURN VALUE 83 .P 84 Returns an IxpStat structure, which must be freed by 85 the caller with free(3). 86 87 .SH SEE ALSO 88 .P 89 ixp_mount(3), ixp_open(3) 90 91 92 .\" man code generated by txt2tags 2.5 (http://txt2tags.sf.net) 93 .\" cmdline: txt2tags -o- ixp_stat.man3 94