ID EN
Pathlib

mkdir

Python 3.11

Create a new directory at this given path. If mode is given, it is combined with the process’ umask value to determine the file mode and access flags. If the path already exists, FileExistsError is raised.

Syntax

PYTHON
Path.mkdir(mode=0o777, parents=False, exist_ok=False)

See Also

FileExistsError FileNotFoundError FileExistsError FileExistsError