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

Add chown functions to std::os::unix::fs to change the owner and group of files #88953

Merged
merged 2 commits into from
Sep 17, 2021

Commits on Sep 15, 2021

  1. Add chown functions to std::os::unix::fs to change the owner and grou…

    …p of files
    
    This is a straightforward wrapper that uses the existing helpers for C
    string handling and errno handling.
    
    Having this available is convenient for UNIX utility programs written in
    Rust, and avoids having to call unsafe functions like `libc::chown`
    directly and handle errors manually, in a program that may otherwise be
    entirely safe code.
    
    In addition, these functions provide a more Rustic interface by
    accepting appropriate traits and using `None` rather than `-1`.
    joshtriplett committed Sep 15, 2021
    Configuration menu
    Copy the full SHA
    4840f67 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    862d89e View commit details
    Browse the repository at this point in the history