Gets directory entries.
.d_ino rd 1
.d_off rd 1
.d_reclen rw 1
.d_name rb 256 ; see below!
Zero based index of the next dirent structure in the array.
Size of this dirent structure.
Null-terminated directory name. This member is actually has a variable size, but cannot exceed NAME_MAX+1 (256) bytes.
If the system call succeeds the return value is number of bytes read. If directory end is reached, 0 is returned.
If the system call fails the return value is one of the following errno values:
Invalid file descriptor.
File descriptor does not refer to a directory.
No such directory.
Result buffer is too small.
Argument points outside the calling process's address space.
See /samples/basic/getdir.asm for an example.