Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new dir module #916

Merged
merged 1 commit into from Sep 4, 2018
Merged

new dir module #916

merged 1 commit into from Sep 4, 2018

Commits on Sep 4, 2018

  1. new dir module

    This is a lower-level interface than `std::fs::ReadDir`. Notable differences:
    
       * can be opened from a file descriptor (as returned by `openat`, perhaps
         before knowing if the path represents a file or directory). Uses
         `fdopendir` for this, available on all Unix platforms as of
         rust-lang/libc#1018.
    
       * implements `AsRawFd`, so it can be passed to `fstat`, `openat`, etc.
    
       * can be iterated through multiple times without closing and reopening the
         file descriptor. Each iteration rewinds when finished.
    
       * returns entries for `.` (current directory) and `..` (parent directory).
    
       * returns entries' names as a `CStr` (no allocation or conversion beyond
         whatever libc does).
    scottlamb committed Sep 4, 2018
    Copy the full SHA
    f9ebcb7 View commit details
    Browse the repository at this point in the history