mini\Util\Path::parent() Method

public

Signature

public function parent(): mini\Contracts\PathInterface

Returns

mini\Contracts\PathInterface

Documentation

Get the parent directory of this path (lexical operation)

Returns the parent directory by removing the last path segment. This is a pure lexical operation with no filesystem access.

Special cases:

  • Root paths (/, C:/, //) return themselves (no parent)
  • Empty or . relative paths return . (current directory)
  • Single segment relative paths return .

Source

src/Util/Path.php:341-371