On this page
genericpath.isjunction
Prev: genericpath.isfile | Up: genericpath | Next: genericpath.islink
Rel: genericpath.commonprefix, genericpath.exists, genericpath.getatime, genericpath.getctime
Ref: docs.python.org — genericpath.isjunction
Tags: #public #python3 #stdlib #genericpath
Import
import genericpath
from genericpath import isjunction
Signature & Overview
genericpath.isjunction(path)
Test whether a path is a junction Junctions are not supported on the current platform
Usage
import os
# Python 3.12+: True only for Windows NTFS junctions (always False on Unix)
if hasattr(os.path, "isjunction"):
assert os.path.isjunction(".") is False
Gotchas
- Requires Python 3.12+: Windows-specific directory junction check.
REPL Inspect
from genericpath import isjunction
help(isjunction)
Linked from
Related notes
- tuts/python3/stdlib_module/genericpath/isfile Linked here; links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/islink Linked here; links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/genericpath/commonprefix Linked here; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/exists Linked here; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/getatime Linked here; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/getctime Linked here; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/getmtime shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/getsize shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/isdevdrive shared tags: #genericpath, #stdlib