stripPrefix method

Option<WindowsPath> stripPrefix(
  1. WindowsPath prefix
)

Returns a path that, when joined onto base, yields this. Returns None if prefix is not a subpath of base.

Implementation

Option<WindowsPath> stripPrefix(WindowsPath prefix) {
  if (!startsWith(prefix)) {
    return None;
  }
  final newPath = _string.substring(prefix._string.length);
  return Some(WindowsPath(newPath));
}