fuchsia.io/Directory.ReadDirents
METHOD
fuchsia.io
sdk/fidl/fuchsia.io/directory.fidl:475
Reads a collection of variably sized dirents into a buffer.
The number of dirents in a directory may be very large: akin to
calling read multiple times on a file, directories have a seek
offset which is updated on subsequent calls to ReadDirents.
Each call to ReadDirents will only return whole dirent structures,
they will not get split across ReadDirent calls. When the seek
offset reaches the end, `dirents` will be empty.
These dirents are of the form:
```
struct dirent {
// Describes the inode of the entry.
uint64 ino;
// Describes the length of the dirent name in bytes.
uint8 size;
// Describes the type of the entry. Aligned with the
// POSIX d_type values. Use `DirentType` constants.
uint8 type;
// Unterminated name of entry.
char name[0];
}
```
This method does not require any rights, since one could always probe for
directory contents by triggering name conflicts during file creation.
Relationships
-
ACCEPTS_TYPE→fuchsia.io/max_bytes -
RETURNS_TYPE→fuchsia.io/s -
RETURNS_TYPE→fuchsia.io/zx -
RETURNS_TYPE→fuchsia.io/Status -
RETURNS_TYPE→fuchsia.io/dirents -
RETURNS_TYPE→fuchsia.io/MAX_BUF
Documentation (1)
-
SUBSTANTIVE
sdk/fidl/fuchsia.io/directory.fidl:475↗
Tests (0)
No test references.
Examples (0)
No example references.
Gaps
Missing categories:
- examples
- tests
Findings (2)
-
WARNING
DOCUMENTED_UNTESTEDelement is documented but has no test references -
WARNING
MISSING_IN_CATEGORYno references in category "tests.unit_tests"