Closed zummenix closed 1 year ago
Nope, it isn't possible. std::fs::DirEntry
is an opaque type. There is no way to directly construct it other than by using std::fs::read_dir
.
Also, it somewhat looks like you might be presenting a false choice here. There is always a third choice: wrap walkdir::DirEntry
in a type you own and expose the routines you need to expose.
Thank you for the recommendation! I'll think about it
I'd prefer to expose
std::fs::DirEntry
in public interface of my crate instead ofwalkdir::DirEntry
.Is it possible to convert
walkdir::DirEntry
intostd::fs::DirEntry
or does it make sense at all?