ID EN
OS Path

getsize

Python 3.11

Return the size, in bytes, of path. Raise OSError if the file does not exist or is inaccessible.

Syntax

PYTHON
os.path.getsize(path)

See Also

OSError path-like object