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 )
32 DIR *opendir(const char *name)
34 int fd = _SysOpen(name, OPENFLAG_READ);
38 DIR *ret = fdopendir(fd);
54 struct dirent *readdir(DIR *dp)
62 int rv = _SysReadDir(dp->fd, dp->tmpent.d_name);
64 // TODO: Fix kernel-land API
72 extern int readdir_r(DIR *, struct dirent *, struct dirent **);
73 extern void rewinddir(DIR *);
74 extern void seekdir(DIR *, long int);
75 extern long int telldir(DIR *);