Probiers mal damit:
readdir_r()--Read Directory Entry