Python Forum

Full Version: max component length of file path name
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i want to get the value of this host's maximum allowed length of a file path name component. for ext4 in Linux this value is 255. it is smaller for some file system types. other platforms may have smaller or larger limitations. i'm guessing if this is available, it would be in module os. but i don't see it in os.
>>> import os
>>> from os import statvfs
>>> statvfs('.').f_namemax
255