Return true if the pathname is reserved by the system.
(path)
| 309 | ) |
| 310 | |
| 311 | def isreserved(path): |
| 312 | """Return true if the pathname is reserved by the system.""" |
| 313 | # Refer to "Naming Files, Paths, and Namespaces": |
| 314 | # https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file |
| 315 | path = os.fsdecode(splitroot(path)[2]).replace(altsep, sep) |
| 316 | return any(_isreservedname(name) for name in reversed(path.split(sep))) |
| 317 | |
| 318 | def _isreservedname(name): |
| 319 | """Return true if the filename is reserved by the system.""" |
nothing calls this directly
no test coverage detected
searching dependent graphs…