funcread#

read(
path: Path | str,
) → Metadata | None#

Read what a mod jar, a pack archive or a pack folder declares about itself.

Parameters:

path (Path | str) – The jar, zip or folder.

Returns:

Its metadata, or None if it declares nothing this module recognises or is not a valid archive.

Raises:

OSError – The file could not be read.

Return type:

Metadata | None