ID EN
Pathlib

unlink

Python 3.11

Remove this file or symbolic link. If the path points to a directory, use Path.rmdir() instead.

Syntax

PYTHON
Path.unlink(missing_ok=False)

See Also

Path.rmdir() FileNotFoundError FileNotFoundError