-
Notifications
You must be signed in to change notification settings - Fork 96
Description
The only module that exposes struct dirent { ...; unsigned char d_type; ... }
is an internal one. Reason I'm interested is, recursive walking of filesystems in Haskell are slow compared to Python's os.walk()
. Haskell ignores the d_type
and then does one or more separate system call per file to determine whether it's a file or directory. Example
I might want to work on this, but I don't know between unix, streaming-common, and conduit which is the right place to begin. It's not really a technical question—I could do it from anywhere—I just want to know if this has been attempted before, and if so, what issues were encountered.
It looks like there's not a sum type in existence for but it would clash conceptually with this.d_type
values corresponding to https://github.com/bminor/musl/blob/86373b4999bfd9a9379bc4a3ca877b1c80a2a340/include/dirent.h#L51-L59 or glibc's equivalent. I'd say there should be,
What are some thoughts?