MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / push

Method push

euralios_std/src/path.rs:201–203  ·  view source on GitHub ↗

Extends `self` with `path`. If `path` is absolute, it replaces the current path. On Windows: if `path` has a root but no prefix (e.g., `\windows`), it replaces everything except for the prefix (if any) of `self`. if `path` has a prefix but no root, it replaces `self`. if `self` has a verbatim prefix (e.g. `\\?\C:\windows`) and `path` is not empty, the new path is normalized: all references to `

(&mut self, path: P)

Source from the content-addressed store, hash-verified

199 /// assert_eq!(path, PathBuf::from("/etc"));
200 /// ```
201 pub fn push<P: AsRef<Path>>(&mut self, path: P) {
202 self._push(path.as_ref())
203 }
204
205 fn _push(&mut self, path: &Path) {
206 // in general, a separator is needed if the rightmost byte is not a separator

Callers 5

_pushMethod · 0.45
_joinMethod · 0.45
pathbuf_with_capacityFunction · 0.45
pathbuf_push_relativeFunction · 0.45
pathbuf_push_absoluteFunction · 0.45

Calls 2

_pushMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected