Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
i'm writing functions for directory handling, but there are some things that i don't understand:
First: Which fields struct DIR must contain?
Second: opendir/readdir/closedir function need a descriptor table like files? Or is not needed?
For the second question i think no, because if openDir returns a pointer to a DIR structure, there isn't need to have a list of open dirs (i think...).
DIR (just like FILE) are not mandated to contain any particular field. There may be an association between file descriptor and DIR - you can use fdopendir to open using a open filedescriptor or get the descriptor from a DIR* with dirfd.
This information was gathered by googling for "opendir" (ending up at opengroup).