stripPrefixOpt method
Returns a path that, when joined onto base, yields this. Returns None/null if prefix
is not a subpath of base.
Implementation
Option<Path> stripPrefixOpt(Path prefix) => Env.isWindows
? WindowsPath(_string)
.stripPrefixOpt(WindowsPath(prefix._string))
.map((e) => Path(e._string))
: UnixPath(_string)
.stripPrefixOpt(UnixPath(prefix._string))
.map((e) => Path(e._string));