lib: c: io: implement standard FILE and DIR interfaces

This commit is contained in:
2026-03-25 20:21:12 +00:00
parent b975256cb9
commit 96784f611f
21 changed files with 599 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#include "dir.h"
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
int closedir(struct __opaque_dir *dirp)
{
close(dirp->d_fd);
if (dirp->d_buf) {
free(dirp->d_buf);
}
free(dirp);
return SUCCESS;
}