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

Method components

euralios_std/src/path.rs:391–398  ·  view source on GitHub ↗

Produces an iterator over the [`Component`]s of the path. When parsing the path, there is a small amount of normalization: Repeated separators are ignored, so `a/b` and `a//b` both have `a` and `b` as components. Occurrences of `.` are normalized away, except if they are at the beginning of the path. For example, `a/./b`, `a/b/`, `a/b/.` and `a/b` all have `a` and `b` as components, but `./a/b`

(&self)

Source from the content-addressed store, hash-verified

389 /// ```
390 ///
391 pub fn components(&self) -> Components<'_> {
392 Components {
393 path: self.as_u8_slice(),
394 has_physical_root: self.has_root(),
395 front: State::StartDir,
396 back: State::Body,
397 }
398 }
399
400 /// Produces an iterator over the path's components viewed as [`OsStr`]
401 /// slices.

Callers 6

canonicalizeFunction · 0.80
iterMethod · 0.80
parentMethod · 0.80
file_nameMethod · 0.80
eqMethod · 0.80
path_componentsFunction · 0.80

Calls 2

as_u8_sliceMethod · 0.80
has_rootMethod · 0.80

Tested by

no test coverage detected