xref: /plan9-contrib/sys/src/ape/lib/ap/plan9/dir.h (revision 219b2ee8daee37f4aad58d63f21287faa8e4ffdc)
1 #define DIRLEN 116
2 
3 typedef	long		vlong;
4 typedef union
5 {
6 	char	clength[8];
7 	vlong	vlength;
8 	struct
9 	{
10 		long	hlength;
11 		long	length;
12 	};
13 } Length;
14 
15 typedef
16 struct Qid
17 {
18 	unsigned long	path;
19 	unsigned long	vers;
20 } Qid;
21 
22 typedef
23 struct Dir
24 {
25 	char	name[NAMELEN];
26 	char	uid[NAMELEN];
27 	char	gid[NAMELEN];
28 	Qid	qid;
29 	unsigned long	mode;
30 	long	atime;
31 	long	mtime;
32 	Length;
33 	short	type;
34 	short	dev;
35 } Dir;
36 
37 void	_dirtostat(struct stat *, char *, Fdinfo*);
38 int	convM2D(char*, Dir*);
39 int	convD2M(Dir*, char*);
40