Something interesting about this one is that it’s not wrapped by glibc, meaning that we need to call it via the syscall(2) method ourselves.
You want opendir(3) and readdir(3).
You want opendir(3) and readdir(3).