os.DirEntry.is_dir()

is_dir(*, follow_symlinks=True) Return True if this entry is a directory or a symbolic link pointing to a directory; return False if the entry is or points to any other kind of file, or if it doesn’t exist anymore. If follow_symlinks is False, return True only if this entry is a directory (without following symlinks); return False if the entry is any other kind of file or if it doesn’t exist anymore. The result is cached on the DirEntry object, with a separate cache for follow_symlinks True

os.DirEntry.inode()

inode() Return the inode number of the entry. The result is cached on the DirEntry object. Use os.stat(entry.path, follow_symlinks=False).st_ino to fetch up-to-date information. On the first, uncached call, a system call is required on Windows but not on Unix.

os.DirEntry

class os.DirEntry Object yielded by scandir() to expose the file path and other file attributes of a directory entry. scandir() will provide as much of this information as possible without making additional system calls. When a stat() or lstat() system call is made, the DirEntry object will cache the result. DirEntry instances are not intended to be stored in long-lived data structures; if you know the file metadata has changed or if a long time has elapsed since calling scandir(), call os.s

os.devnull

os.devnull The file path of the null device. For example: '/dev/null' for POSIX, 'nul' for Windows. Also available via os.path.

os.device_encoding()

os.device_encoding(fd) Return a string describing the encoding of the device associated with fd if it is connected to a terminal; else return None.

os.defpath

os.defpath The default search path used by exec*p* and spawn*p* if the environment doesn’t have a 'PATH' key. Also available via os.path.

os.curdir

os.curdir The constant string used by the operating system to refer to the current directory. This is '.' for Windows and POSIX. Also available via os.path.

os.ctermid()

os.ctermid() Return the filename corresponding to the controlling terminal of the process. Availability: Unix.

os.cpu_count()

os.cpu_count() Return the number of CPUs in the system. Returns None if undetermined. New in version 3.4.

os.confstr_names

os.confstr_names Dictionary mapping names accepted by confstr() to the integer values defined for those names by the host operating system. This can be used to determine the set of names known to the system. Availability: Unix.