What is the maximum file path allowed in Android

喜欢而已 提交于 2019-12-06 02:31:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!