Generally speaking...

Updated: October 28, 2024

Generally speaking, returning directory entries is just like returning raw data, with the exceptions listed here.

The first point means that you cannot return, for example, seven and a half struct dirent entries. If eight of these structures don't fit into the allotted space, then you must return only seven.

The second point is fairly obvious; it's mentioned here only because filling in the struct dirent can be a little tricky compared to the “raw data” approach for a “normal” read I/O function handler.

  翻译: