Skip to content

Commit

Permalink
Document semantics of add_entry parameter to readdir callback.
Browse files Browse the repository at this point in the history
Fixes: #196.
  • Loading branch information
nrath-js committed Dec 3, 2024
1 parent 36cd288 commit 8ade91f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/api/filesystem/async_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,9 @@ pub trait AsyncFileSystem: FileSystem {
/// the file system did not return a `Handle` from `opendir` then the contents of `handle` are
/// undefined.
///
/// `size` indicates the maximum number of bytes that should be returned by this method.
/// `size` indicates the maximum number of bytes that should be returned by this method,
/// but can be ignored in practice. Instead, entries are returned by calling the
/// `add_entry` function until it returns zero (indicating that the buffer is full).
///
/// If `offset` is non-zero then it corresponds to one of the `offset` values from a `DirEntry`
/// that was previously returned by a call to `readdir` for the same handle. In this case the
Expand Down
5 changes: 4 additions & 1 deletion src/api/filesystem/sync_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,10 @@ pub trait FileSystem {
/// the file system did not return a `Handle` from `opendir` then the contents of `handle` are
/// undefined.
///
/// `size` indicates the maximum number of bytes that should be returned by this method.
/// `size` indicates the maximum number of bytes that should be returned by this method,
/// but can be ignored in practice. Instead, entries are returned by calling the
/// `add_entry` function until it returns zero (indicating that the buffer is full).
///
///
/// If `offset` is non-zero then it corresponds to one of the `offset` values from a `DirEntry`
/// that was previously returned by a call to `readdir` for the same handle. In this case the
Expand Down

0 comments on commit 8ade91f

Please sign in to comment.