ID EN
OS

mknod

Python 3.11

Create a filesystem node (file, device special file or named pipe) named path. mode specifies both the permissions to use and the type of node to be created, being combined (bitwise OR) with one of stat.S_IFREG, stat.S_IFCHR, stat.S_IFBLK, and stat.S_IFIFO (those constants are available in stat). For stat.S_IFCHR and stat.S_IFBLK, device defines the newly created device special file (probably using os.makedev()), otherwise it is ignored.

Syntax

PYTHON
os.mknod(path, mode=0o600, device=0, *, dir_fd=None)

See Also

stat os.makedev() paths relative to directory descriptors Availability path-like object