Include set_permissions in UNIX/macos/linux only

This commit is contained in:
ChristianVisintin
2020-12-18 20:58:57 +01:00
parent 9c2e751e11
commit 6bc2bcb89e

View File

@@ -23,12 +23,14 @@
* *
*/ */
use std::fs::{self, set_permissions, File, Metadata, OpenOptions}; use std::fs::{self, File, Metadata, OpenOptions};
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::time::SystemTime; use std::time::SystemTime;
// Metadata ext // Metadata ext
#[cfg(any(target_os = "unix", target_os = "macos", target_os = "linux"))] #[cfg(any(target_os = "unix", target_os = "macos", target_os = "linux"))]
use std::os::unix::fs::{MetadataExt, PermissionsExt}; use std::os::unix::fs::{MetadataExt, PermissionsExt};
#[cfg(any(target_os = "unix", target_os = "macos", target_os = "linux"))]
use std::fs::set_permissions;
// Locals // Locals
use crate::fs::{FsDirectory, FsEntry, FsFile}; use crate::fs::{FsDirectory, FsEntry, FsFile};