Skip to content

Commit c4f4c40

Browse files
committed
Change crate by OS
1 parent 07d3be0 commit c4f4c40

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/utils/file_check.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ use faccess::PathExt;
66
use nix::unistd;
77
use std::fs;
88
use std::os::unix::fs::{FileTypeExt, PermissionsExt};
9+
10+
#[cfg(target_os = "linux")]
911
use std::os::linux::fs::MetadataExt;
12+
#[cfg(target_os = "macos")]
13+
use std::os::macos::fs::MetadataExt;
14+
1015
use std::path::Path;
1116

1217
pub fn exists(name: &str) -> bool {

0 commit comments

Comments
 (0)