summaryrefslogtreecommitdiff
path: root/interface/sys/dirent.h
blob: bf377467a9fca49c2c5a734efc96b1aba3630445 (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
#ifndef _DIRENT_H
#define _DIRENT_H

#include <stdint.h>

enum FS_FILE_TYPE
{
    FS_FILE_TYPE_DIR	=	1,
    FS_FILE_TYPE_FILE	=	2
};

struct dirent
{
    uint32_t	d_ino;
    char	d_name[255];

    // rest is optional
    uint8_t	type;    //FILE OR DIR (FS_FILE_TYPE)

    int pos; // position of last read!
    char dirname[255]; // directory name we are traversing TODO:  use inode here or similar for other systems!
};

typedef struct dirent DIR;

#endif