File: dirent.h

package info (click to toggle)
klibc 2.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,240 kB
  • sloc: ansic: 48,401; asm: 2,531; perl: 789; makefile: 231; sh: 160
file content (32 lines) | stat: -rw-r--r-- 568 bytes parent folder | download | duplicates (12)
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
/*
 * sys/dirent.h
 */

#ifndef _SYS_DIRENT_H
#define _SYS_DIRENT_H

#include <stdint.h>

/* The kernel calls this struct dirent64 */
struct dirent {
	uint64_t	d_ino;
	int64_t		d_off;
	unsigned short	d_reclen;
	unsigned char	d_type;
	char		d_name[256];
};

/* File types to use for d_type */
#define DT_UNKNOWN	 0
#define DT_FIFO		 1
#define DT_CHR		 2
#define DT_DIR		 4
#define DT_BLK		 6
#define DT_REG		 8
#define DT_LNK		10
#define DT_SOCK		12
#define DT_WHT		14

__extern int getdents(unsigned int, struct dirent *, unsigned int);

#endif				/* _SYS_DIRENT_H */