Tracking Issue for path_trailing_sep (original) (raw)
Feature gate: #![feature(path_trailing_sep)]
This is a tracking issue for the Path::has_trailing_sep and related methods, which enforce whether a Path or PathBuf ends in a trailing separator.
Public API
impl Path { fn has_trailing_sep(&self) -> bool; fn with_trailing_sep(&self) -> Cow<'_, Path>; fn trim_trailing_sep(&self) -> &Path; } impl PathBuf { fn set_trailing_sep(&mut self, suffix: bool); fn push_trailing_sep(&mut self); fn pop_trailing_sep(&mut self); }
Steps / History
(Remember to update the S-tracking-* label when checking boxes.)
- ACP: ACP: PathBuf::has_dir_suffix libs-team#335
- Implementation: Add Path::has_trailing_sep and related methods #142506
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- Should we offer the
set_trailing_sepAPI orpush_trailing_sep/pop_trailing_sepseparately? Right now, both are offered to see which is preferred. - Is
trim_trailing_sepnecessary? It wasn't in the original ACP.