Is there a way to change file metadata (e.g. owner) on Unix platforms using Rust?

The standard library provides a way to change file permissions, so I wonder if I am missing something.

+4
source share
1 answer

Some functional functionality of the OS can be found in the module std::os: for example, std::os::unix::fs::MetadataExtit allows you to read uid/ guidor std::os::unix::fs::PermissionsExtprocess file modes. However, AFAIK does not support stdchanging ownership / group.

As PeterHall noted , libcthere is a function chmod(s chown) in the box .

coreutils, GNU CLI, .

+4

Source: https://habr.com/ru/post/1670477/


All Articles