Function opendal::layers::observe::path_label_value
source · pub fn path_label_value(path: &str, level: usize) -> Option<&str>
Expand description
Return the path label value according to the given path
and level
.
- level = 0: return
None
, which means we ignore the path label. - level > 0: the path label will be the path split by “/” and get the last n level, if n=1 and input path is “abc/def/ghi”, and then we’ll use “abc/” as the path label.