On this page
posixpath.islink
Prev: posixpath.isjunction | Up: posixpath | Next: posixpath.ismount
Rel: posixpath.abspath, posixpath.basename, posixpath.commonpath, posixpath.commonprefix
Ref: docs.python.org — posixpath.islink
Tags: #public #python3 #stdlib #posixpath
Import
import posixpath
from posixpath import islink
Signature & Overview
posixpath.islink(path)
Test whether a path is a symbolic link
Usage
import posixpath
assert posixpath.islink('.') is False
Gotchas
- True for both valid and broken symlinks.
REPL Inspect
from posixpath import islink
help(islink)
Linked from
Related notes
- tuts/python3/stdlib_module/posixpath/isjunction Linked here; links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/ismount Linked here; links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/posixpath/abspath Linked here; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/basename Linked here; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/commonpath Linked here; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/commonprefix Linked here; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/dirname shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/exists shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/expanduser shared tags: #posixpath, #stdlib