file_storage/path/system/
is_unix.rs1use crate::{FilePath, FolderPath, StoragePath};
2
3impl StoragePath {
4 pub fn is_unix_path(&self) -> bool {
8 Self::is_unix_path_str(self.path())
9 }
10
11 pub fn is_unix_path_str<S>(path: S) -> bool
13 where
14 S: AsRef<str>,
15 {
16 path.as_ref().starts_with("/")
17 }
18}
19
20impl FilePath {
21 pub fn is_unix_path(&self) -> bool {
25 StoragePath::is_unix_path_str(self.as_str())
26 }
27}
28
29impl FolderPath {
30 pub fn is_unix_path(&self) -> bool {
34 StoragePath::is_unix_path_str(self.as_str())
35 }
36}