file_storage/path/system/
is_local.rs1use crate::{FilePath, FolderPath, StoragePath};
2
3impl StoragePath {
4 pub fn is_local_path(&self) -> bool {
8 Self::is_local_path_str(self.path())
9 }
10
11 pub fn is_local_path_str<S>(path: S) -> bool
13 where
14 S: AsRef<str>,
15 {
16 let path: &str = path.as_ref();
17 StoragePath::is_unix_path_str(path) || StoragePath::is_windows_path_str(path)
18 }
19}
20
21impl FilePath {
22 pub fn is_local_path(&self) -> bool {
26 StoragePath::is_local_path_str(self.as_str())
27 }
28}
29
30impl FolderPath {
31 pub fn is_local_path(&self) -> bool {
35 StoragePath::is_local_path_str(self.as_str())
36 }
37}