parent property

PathUri? get parent

Returns the parent of the path.

Implementation

PathUri? get parent {
  if (pathSegments.isNotEmpty) {
    return PathUri(
      isAbsolute: isAbsolute,
      isDirectory: true,
      pathSegments: pathSegments.rebuild((b) => b.removeLast()),
    );
  }

  return null;
}