rustix icon indicating copy to clipboard operation
rustix copied to clipboard

Implement dirfd equivalent functions

Open LGFae opened this issue 3 months ago • 0 comments

Implement functions that allow us to retrieve the directory stream file descriptor, equivalent to libc's dirfd function.

On linux, we can simply return the file descriptor itself (I verified this is what musl does).


This fixes #1455. I've tried following rustix's style in general. Overall, it is a fairly simple change. I don't know if you want to add some tests for it or not (I may need a little bit of guidance in that case).

LGFae avatar Nov 18 '25 18:11 LGFae