mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-26 17:40:37 +00:00
libs: add RemotePath::strip_prefix
This commit is contained in:
@@ -111,6 +111,10 @@ impl RemotePath {
|
||||
pub fn extension(&self) -> Option<&str> {
|
||||
self.0.extension()?.to_str()
|
||||
}
|
||||
|
||||
pub fn strip_prefix(&self, p: &RemotePath) -> Result<&Path, std::path::StripPrefixError> {
|
||||
self.0.strip_prefix(&p.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Storage (potentially remote) API to manage its state.
|
||||
|
||||
Reference in New Issue
Block a user