parentOpt method
Returns the Path without its final component, if there is one. This means it returns Some("")/"" for relative paths with one component. Returns None/null if the path terminates in a root or prefix, or if it’s the empty string.
Implementation
Option<WindowsPath> parentOpt() => Option.of(parent());