3 * - By John Hodge (thePowersGang)
6 * - Directory Functions
9 #include <stddef.h> // NULL
10 #include <acess/sys.h>
22 DIR *fdopendir(int fd)
25 if( _SysFInfo(fd, &info, 0) != 0 )
28 DIR *ret = malloc(sizeof(DIR));
34 DIR *opendir(const char *name)
36 int fd = _SysOpen(name, OPENFLAG_READ);
40 DIR *ret = fdopendir(fd);
58 struct dirent *readdir(DIR *dp)
66 int rv = _SysReadDir(dp->fd, dp->tmpent.d_name);
68 // TODO: Fix kernel-land API
76 extern int readdir_r(DIR *, struct dirent *, struct dirent **);
77 extern void rewinddir(DIR *);
78 extern void seekdir(DIR *, long int);
79 extern long int telldir(DIR *);