Skip to content

FileMode#

The file mode of the entry.

binary: bool property #

The file is a binary file (needs binary prefix replacement).

Examples#

>>> paths_json = PathsJson.from_path(
...     "../test-data/conda-22.9.0-py38haa244fe_2-paths.json"
... )
>>> entry = paths_json.paths[-1]
>>> file_mode = entry.prefix_placeholder.file_mode
>>> file_mode.binary
False
>>>

text: bool property #

The file is a text file (needs text prefix replacement).

Examples#

>>> paths_json = PathsJson.from_path(
...     "../test-data/conda-22.9.0-py38haa244fe_2-paths.json"
... )
>>> entry = paths_json.paths[-1]
>>> file_mode = entry.prefix_placeholder.file_mode
>>> file_mode.text
True
>>>

unknown: bool property #

The file mode is unknown/unspecified Examples


```python

paths_json = PathsJson.from_path( ... "../test-data/conda-22.9.0-py38haa244fe_2-paths.json" ... ) entry = paths_json.paths[-1] file_mode = entry.prefix_placeholder.file_mode file_mode.unknown False

__repr__() #

Returns a representation of the FileMode.