Skip to content

PathType#

The path type of the path entry

directory: bool property #

This should explicitly create an empty directory.

Examples#

>>> paths_json = PathsJson.from_path(
...     "../test-data/conda-22.9.0-py38haa244fe_2-paths.json"
... )
>>> entry = paths_json.paths[0]
>>> path_type = entry.path_type
>>> path_type.directory
False
>>>

The path should be hard linked (the default).

>>> paths_json = PathsJson.from_path(
...     "../test-data/conda-22.9.0-py38haa244fe_2-paths.json"
... )
>>> entry = paths_json.paths[0]
>>> path_type = entry.path_type
>>> path_type.hardlink
True
>>>

The path should be soft linked.

>>> paths_json = PathsJson.from_path(
...     "../test-data/conda-22.9.0-py38haa244fe_2-paths.json"
... )
>>> entry = paths_json.paths[0]
>>> path_type = entry.path_type
>>> path_type.softlink
False
>>>

__repr__() #

Returns a representation of the PathType.