最大文件名长度在Android中 [英] max file name length in Android
问题描述
我想给一个名字,我创建一个文件。我只是想知道, 什么是最大的文件名长度在Android的?
I am trying give a name for a file that I am creating. I just want to know that what is the max file name length in Android ?
有没有规范的文件名?我可以像使用字符 -
或>
?
Is there a specification for a file name? Can I use characters like -
or >
?
推荐答案
关于人物:读<一href="http://stackoverflow.com/questions/2679699/what-characters-allowed-in-file-names-on-android">here,看起来像 -
是不是保留字,所以它也可以使用。 &GT;
然而,被保留,因此可以不使用
About the characters: Reading here, looks like -
is not a reserved character, so it may be used. >
however, is reserved therefore may not be used.
关于最大长度:既然我找不到具体到Android什么了,由于Java不限制它与文件名的长度(正如你所看到的<一个href="http://stackoverflow.com/questions/4512742/does-java-io-have-a-maximum-file-name-length">here),我想说的最大长度是一样使用最广泛的限制,这是255个字节。
About the maximum length: Since I couldn't find anything specific to Android, and since java does not restrict the length of a file name it works with (As you can see here), I'd say the maximum length is like the most widely used limit, which is 255 bytes.
这篇关于最大文件名长度在Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!