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)
| 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. |
no test coverage detected