Function opendal::raw::normalize_path
source · pub fn normalize_path(path: &str) -> String
Expand description
Make sure all operation are constructed by normalized path:
- Path endswith
/
means it’s a dir path. - Otherwise, it’s a file path.
§Normalize Rules
- All whitespace will be trimmed:
abc/def
=>abc/def
- All leading / will be trimmed:
///abc
=>abc
- Internal // will be replaced by /:
abc///def
=>abc/def
- Empty path will be
/
: `` =>/