You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is currently no safe way in rust to open a filedescriptor on a directory and using it for reading entries. Currently you always have to open a new filedescriptor using std::fs::read_dir<P: AsRef<Path>>(path: P) -> io::Result<ReadDir>. At least for my understanding, if you need to access the directory multiple times (for example for a directory watcher), this is inefficient.
A solution would be to introduce a new struct called "Dir" or "Directory" with a "read_dir" function, which can be used to access a directory multiple times without opening another filedescriptor. Another solution would be to extend the std::fs::File struct with a "read_dir" function.
The text was updated successfully, but these errors were encountered:
There is currently no safe way in rust to open a filedescriptor on a directory and using it for reading entries. Currently you always have to open a new filedescriptor using
std::fs::read_dir<P: AsRef<Path>>(path: P) -> io::Result<ReadDir>
. At least for my understanding, if you need to access the directory multiple times (for example for a directory watcher), this is inefficient.A solution would be to introduce a new struct called "Dir" or "Directory" with a "read_dir" function, which can be used to access a directory multiple times without opening another filedescriptor. Another solution would be to extend the std::fs::File struct with a "read_dir" function.
The text was updated successfully, but these errors were encountered: