FS Interface Docs: Made read_dir description clear

Small change in the docs to make the explanation of read_dir
functionality a little more clear.

Change-Id: I202eb0f70b38c78962ad9ca1d267995977c04951
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2900
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
This commit is contained in:
CruxBox 2020-06-10 22:20:32 +05:30 committed by Axel Dörfler
parent 3959883f50
commit bb6b48a9c3
1 changed files with 6 additions and 4 deletions

View File

@ -1406,12 +1406,14 @@
aligned. A FS doesn't have to read more than one entry at a time, but it is
recommended to support that for performance reasons.
When the function is invoked after the end of the directory has been
reached, it shall set the variable \a _num points to to \c 0 and return
\c B_OK. If the provided buffer is too small to contain even the single next
If the provided buffer is too small to contain even the single next
entry, \c B_BUFFER_OVERFLOW shall be returned. It shall not fail, if at
least one entry has been read, and the buffer is just too small to hold as
many entries as requested.
many entries as requested. When the function is invoked after the end of
the directory has been reached, it shall set the variable \a _num points to
\c 0 and return \c B_OK. Usually the function is invoked repeatedly until
then to get more entries. The \c cookie parameter must be used to track the
position in the directory.
Note that a directory is expected to contain the special entries \c "." and
\c "..", referring to the same directory and the parent directory