LibC: Implement rewinddir

This commit is contained in:
Bananymous 2025-06-27 16:53:27 +03:00
parent 5f07d53034
commit d68c88c3f9
1 changed files with 7 additions and 0 deletions

View File

@ -102,3 +102,10 @@ readdir_do_syscall:
return &dirp->entries[0];
}
void rewinddir(DIR* dirp)
{
dirp->entry_count = 0;
dirp->entry_index = 0;
lseek(dirp->fd, 0, SEEK_SET);
}