On this page
genericpath.islink
Prev: genericpath.isjunction | Up: genericpath | Next: genericpath.lexists
Rel: genericpath.commonprefix, genericpath.exists, genericpath.getatime, genericpath.getctime
Ref: docs.python.org — genericpath.islink
Tags: #public #python3 #stdlib #genericpath
Import
import genericpath
from genericpath import islink
Signature & Overview
genericpath.islink(path)
Test whether a path is a symbolic link
Usage
import os
assert os.path.islink(".") is False
Gotchas
- Returns
Trueeven for broken symlinks (unlikeexists()).
REPL Inspect
from genericpath import islink
help(islink)
Linked from
Related notes
- tuts/python3/stdlib_module/genericpath/isjunction Linked here; links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/lexists 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