about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-09-17 17:41:18 +0200
committerGitHub <noreply@github.com>2021-09-17 17:41:18 +0200
commit723d27934bcf7b8ded74c8a90298fdaece99ebd2 (patch)
treebf6fa85463a0f428c8f68b268e97b544bf52fe0a /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent6f5c09849ed46b767922675d18e9d7fcbfbb69e2 (diff)
parent862d89e3b5ba092d95586fc2a33b23d1c8672087 (diff)
downloadrust-723d27934bcf7b8ded74c8a90298fdaece99ebd2.tar.gz
rust-723d27934bcf7b8ded74c8a90298fdaece99ebd2.zip
Rollup merge of #88953 - joshtriplett:chown, r=dtolnay
Add chown functions to std::os::unix::fs to change the owner and group 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`.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions