3 * - By John Hodge (thePowersGang)
6 * - Directory Functions
9 #include <stddef.h> // NULL
10 #include <acess/sys.h>
21 DIR *fdopendir(int fd)
24 if( _SysFInfo(fd, &info, 0) != 0 )
27 DIR *ret = malloc(sizeof(DIR));
33 DIR *opendir(const char *name)
35 int fd = _SysOpen(name, OPENFLAG_READ);
39 DIR *ret = fdopendir(fd);
57 struct dirent *readdir(DIR *dp)
65 int rv = _SysReadDir(dp->fd, dp->tmpent.d_name);
67 // TODO: Fix kernel-land API
75 extern int readdir_r(DIR *, struct dirent *, struct dirent **);
76 extern void rewinddir(DIR *);
77 extern void seekdir(DIR *, long int);
78 extern long int telldir(DIR *);