Format the path with a '/' appended if its a directory. Clients (eg. object_store listing) can and will use the presence of trailing slash as a heuristic
(&self)
| 205 | /// Format the path with a '/' appended if its a directory. |
| 206 | /// Clients (eg. object_store listing) can and will use the presence of trailing slash as a heuristic |
| 207 | fn to_string(&self) -> Option<String> { |
| 208 | self.path.to_str().map(|path| { |
| 209 | if self.is_dir { |
| 210 | format!("{path}/") |
| 211 | } else { |
| 212 | path.to_string() |
| 213 | } |
| 214 | }) |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | #[cfg(test)] |