Sha256: 1fa315e926450aa559e46eaa3cd9131d530b9f063a0e573dfcd3ed65dfd0fb6b
Contents?: true
Size: 908 Bytes
Versions: 39
Compression:
Stored size: 908 Bytes
Contents
use super::get_path::concatenate; use crate::fs::Permissions; use std::path::Path; use std::{fs, io}; /// *Unsandboxed* function similar to `set_permissions`, but which does not /// perform sandboxing. pub(crate) fn set_permissions_unchecked( start: &fs::File, path: &Path, perm: Permissions, ) -> io::Result<()> { // According to [Rust's documentation], `fs::set_permissions` uses // `SetFileAttributes`, and according to [Windows' documentation] // `SetFileAttributes` does not follow symbolic links. // // [Windows' documentation]: https://docs.microsoft.com/en-us/windows/win32/fileio/symbolic-link-effects-on-file-systems-functions#setfileattributes // [Rust's documentation]: https://doc.rust-lang.org/std/fs/fn.set_permissions.html#platform-specific-behavior let out_path = concatenate(start, path)?; fs::set_permissions(out_path, perm.into_std(start)?) }
Version data entries
39 entries across 39 versions & 1 rubygems