File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,17 @@ pub fn getcwd() -> Result<PathBuf> {
305305 }
306306}
307307
308+ /// Change the ownership of the file at `path` to be owned by the specified
309+ /// `owner` (user) and `group` (see
310+ /// [chown(2)](http://man7.org/linux/man-pages/man2/lchown.2.html)).
311+ ///
312+ /// The owner/group for the provided path name will not be modified if `None` is
313+ /// provided for that argument. Ownership change will be attempted for the path
314+ /// only if `Some` owner/group is provided.
315+ ///
316+ /// This call may fail under a number of different situations. See [the man
317+ /// pages](http://man7.org/linux/man-pages/man2/lchown.2.html#ERRORS) for
318+ /// additional details.
308319#[ inline]
309320pub fn chown < P : ?Sized + NixPath > ( path : & P , owner : Option < uid_t > , group : Option < gid_t > ) -> Result < ( ) > {
310321 let res = try!( path. with_nix_path ( |cstr| {
You can’t perform that action at this time.
0 commit comments