pathlib.PurePath.is_reserved()

PurePath.is_reserved()

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

1
2
3
4
>>> PureWindowsPath('nul').is_reserved()
True
>>> PurePosixPath('nul').is_reserved()
False

File system calls on reserved paths can fail mysteriously or have unintended effects.

doc_python
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.