On this page
  1. posix.DirEntry
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

posix.DirEntry

Prev: posix.device_encoding | Up: posix | Next: posix.dup
Rel: posix.abort, posix.access, posix.chdir, posix.chflags
Ref: docs.python.org — posix.DirEntry
Tags: #public #python3 #stdlib #posix


Import

import posix
from posix import DirEntry

Signature & Overview

posix.DirEntry()

posix.DirEntry class.

Methods & Attributes

Usage

import os

with os.scandir('.') as it:
    first = next(it, None)
    assert first is None or isinstance(first, os.DirEntry)

Gotchas

REPL Inspect

from posix import DirEntry
help(DirEntry)

Linked from

Related notes