1cfg_select! {
2 target_os = "hermit" => {
3 mod hermit;
4 #[expect(dead_code)]
5 mod unsupported;
6 mod imp {
7 pub use super::hermit::{getcwd, temp_dir};
8 pub use super::unsupported::{chdir, SplitPaths, split_paths, JoinPathsError, join_paths, current_exe, home_dir};
9 }
10 }
11 target_os = "motor" => {
12 mod motor;
13 #[expect(dead_code)]
14 mod unsupported;
15 mod imp {
16 pub use super::motor::{getcwd, chdir, current_exe, temp_dir};
17 pub use super::unsupported::{SplitPaths, split_paths, JoinPathsError, join_paths, home_dir};
18 }
19 }
20 all(target_vendor = "fortanix", target_env = "sgx") => {
21 mod sgx;
22 #[expect(dead_code)]
23 mod unsupported;
24 mod imp {
25 pub use super::sgx::chdir;
26 pub use super::unsupported::{getcwd, SplitPaths, split_paths, JoinPathsError, join_paths, current_exe, temp_dir, home_dir};
27 }
28 }
29 target_os = "uefi" => {
30 mod uefi;
31 use uefi as imp;
32 }
33 target_family = "unix" => {
34 mod unix;
35 use unix as imp;
36 }
37 target_os = "wasi" => {
38 mod wasi;
39 #[expect(dead_code)]
40 mod unsupported;
41 mod imp {
42 pub use super::wasi::{getcwd, chdir, temp_dir};
43 pub use super::unsupported::{current_exe, SplitPaths, split_paths, JoinPathsError, join_paths, home_dir};
44 }
45 }
46 target_os = "windows" => {
47 mod windows;
48 use windows as imp;
49 }
50 _ => {
51 mod unsupported;
52 use unsupported as imp;
53 }
54}
55
56pub use imp::{
57 JoinPathsError, SplitPaths, chdir, current_exe, getcwd, home_dir, join_paths, split_paths,
58 temp_dir,
59};