blob: 014e4cb6e833d5d0e1f23f8588d5380e90954203 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#pragma once
// XXX: os vs sys prefix...
typedef struct os·Directory os·Directory;
typedef struct os·DirEntry os·DirEntry;
struct os·Directory
{
intptr off;
int fd;
int pad;
int pos, end;
/* buf needs fall on (off_t) 8 byte alignment */
char buf[2048];
};
struct os·DirEntry
{
ulong ino; /* inode number */
ulong off; /* offset to next entry (from start of directory */
ushort len; /* length of entry (in bytes) */
uchar type; /* filetype */
char name[]; /* filename */
};
/* types of DirEntry (last byte) */
#define os·EntryUnknown 0
#define os·EntryFifo 1
#define os·EntryChar 2
#define os·EntryDir 4
#define os·EntryBlock 6
#define os·EntryFile 8
#define os·EntryLink 10
#define os·EntrySocket 12
|