问题
The question here talks about file name length limit, I'm interested in the overall permitted path length (if it matters).
There's this filesystems limits table here, though I'm not sure which applies to Android of which version.
回答1:
I tested with 1024 characters long path and it works in every device I tested on. I didn't go further up, maybe it mess up the sd card.
I think, max file name length should be less than 128 and max file path length should be less than 1024 for Android. Again these are just my assumptions, they could be wrong. So be careful.
回答2:
Its not defined for Android as a whole- different devices use different filesystems. I wouldn't use a name over 255 characters (the limit of ext3, which some deices use), but I don't think there's a common length you could claim is the maximum across devices
来源:https://stackoverflow.com/questions/17498115/what-is-the-maximum-file-path-allowed-in-android