thombashi / pathvalidate

A Python library to sanitize/validate a string such as filenames/file-paths/etc.
https://pathvalidate.rtfd.io/
MIT License
210 stars 12 forks source link

Detect max path and max filename lengths on unix systems #50

Open 7x11x13 opened 1 week ago

7x11x13 commented 1 week ago

Currently I believe these are hardcoded as 4096 and 255 respectively. It would be better to detect the limits if possible: https://stackoverflow.com/a/62796371

7x11x13 commented 1 week ago

I guess this would only work if we are sanitizing for the same platform which we are on. Maybe there could be another platform type "Native" which sanitizes for the platform which the script is being run on?