PyDocs

Nav

Generic Operating System Services

fsencode

os

function · Added in 3.2 (source)
  • fsencode(filename)
Encode filename (an os.PathLike, bytes, or str) to the filesystem
encoding with 'surrogateescape' error handler, return bytes unchanged.
On Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).
Changed in 3.6
  • 3.6: Support added to accept objects implementing the os.PathLike interface.
0 Examples
No examples for os/fsencode.
See Also
No see-alsos for os/fsencode
0 Notes
No notes for fsencode