ID EN
Pathlib

is_reserved

Python 3.11

With PureWindowsPath, return True if the path is considered reserved under Windows, False otherwise. With PurePosixPath, False is always returned.

Syntax

PYTHON
PurePath.is_reserved()

Examples

Example 1
PYTHON
>>> PureWindowsPath('nul').is_reserved()
True
>>> PurePosixPath('nul').is_reserved()
False

See Also

PureWindowsPath PurePosixPath