MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / from_native

Method from_native

atomic-repository/src/repository/project_tree.rs:76–79  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

74 /// Convert a native path without normalization or replacement characters.
75 #[cfg(unix)]
76 pub fn from_native(path: &Path) -> Result<Self, ProjectTreeError> {
77 use std::os::unix::ffi::OsStrExt;
78 Self::from_bytes(path.as_os_str().as_bytes())
79 }
80
81 /// Windows native paths are WTF-16, so exact bytes are only available
82 /// when the path is valid Unicode. Every path this repository stores

Callers

nothing calls this directly

Calls 1

as_bytesMethod · 0.45

Tested by

no test coverage detected