On this page
  1. posix.fstat
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

posix.fstat

Prev: posix.fspath | Up: posix | Next: posix.fstatvfs
Rel: posix.abort, posix.access, posix.chdir, posix.chflags
Ref: docs.python.org — posix.fstat
Tags: #public #python3 #stdlib #posix


Import

import posix
from posix import fstat

Signature & Overview

posix.fstat(fd)

Perform a stat system call on the given file descriptor.

Usage

import os, tempfile

with tempfile.TemporaryFile() as f:
    assert os.fstat(f.fileno()).st_size == 0

Gotchas

REPL Inspect

from posix import fstat
help(fstat)

Linked from

Related notes