ID EN
OS

fsencode

Python 3.11

Encode path-like filename to the filesystem encoding and error handler; return bytes unchanged.

Syntax

PYTHON
os.fsencode(filename)

See Also

path-like filesystem encoding and error handler bytes fsdecode() os.PathLike