BarryServer : Git

All the code for all my projects
// BarryServer : Git / OrionLibC / blob / 2e2f919ac415da5f75aeb6b83981b659fa5072eb / include / dirent.h

// Related

OrionLibC

Barry Using POSIX names for structs 11f4683 (2 years, 2 months ago)
#ifndef _DIRENT_H
#define _DIRENT_H

#include <stddef.h>
#include <sys/types.h>

enum DirType {
	DT_UNKNOWN,
	DT_REG,
	DT_DIR,
	DT_CHR,
	DT_BLK,
	DT_FIFO,
	DT_SOCK,
	DT_LNK,
};

/* Structure for a Directory Entry */
typedef struct dirent {
	ino_t d_ino;
	enum DirType d_type;
	size_t d_namelen;
	char d_name[];
} DirEnt;

#ifdef __cplusplus
extern "C" {
#endif

size_t getdents(int fd, void *buf, size_t count);

#ifdef __cplusplus
}
#endif

#endif