Python Forum
max component length of file path name
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
max component length of file path name
#1
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.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
>>> import os
>>> from os import statvfs
>>> statvfs('.').f_namemax
255
Skaperen likes this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  importing a module given a path to the file Skaperen 8 1,200 Nov-04-2023, 07:03 PM
Last Post: Skaperen
  file system path representation Skaperen 7 3,568 Mar-03-2021, 02:12 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020