On this page
posix.fpathconf
Prev: posix.forkpty | Up: posix | Next: posix.fspath
Rel: posix.abort, posix.access, posix.chdir, posix.chflags
Ref: docs.python.org — posix.fpathconf
Tags: #public #python3 #stdlib #posix
Import
import posix
from posix import fpathconf
Signature & Overview
posix.fpathconf(fd, name, /)
Return the configuration limit name for the file descriptor fd.
Usage
import os, tempfile
with tempfile.TemporaryFile() as f:
val = os.fpathconf(f.fileno(), 'PC_NAME_MAX')
assert isinstance(val, int)
Gotchas
- Unix-only: Queries per-filesystem limits on an open fd.
REPL Inspect
from posix import fpathconf
help(fpathconf)
Linked from
Related notes
- tuts/python3/stdlib_module/posix/forkpty Linked here; links to this page; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/fspath Linked here; links to this page; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/posix/abort Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/access Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chdir Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chflags Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chmod shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chown shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chroot shared tags: #posix, #stdlib