-
Notifications
You must be signed in to change notification settings - Fork 231
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Following the use-case and the failure of #1552 , it would be nice for rustix to export in some way a more direct access to getdents. I am just unsure how this would look like.
I see 2 easy possible options:
- make
getdents_uninitpublic. RawDircould export the value ofinitializedsoRawDir::new(...).next()could be used to fill the buffer once and, with the value ofinitializedthe parsing of the buffer could be delayed for later. But this rely on the first call tonext()to always call the syscall and fill the buffer which is an underlying behavior of the library and not really future proof.
With the Unsized nature of linux_dirent64 I cannot think of any safe implementation, maybe a new getdents method that takes in the rustix' Buffer trait (but then nothing about alignment there).
I can implement any of the above approaches.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request