在内部存储器中创建文件夹 [英] Creation of folder inside the internal storage
问题描述
我想创建文件夹内部存储(android / data / com.AppName)在android和类似的IOS。如何做到使用phonegap?
同样,ios的内部存储路径是什么?
在Android上:按官方API docs
将 config.xml中的两行添加到 config.xml :
< preference name =AndroidPersistentFileLocationvalue =Internal/>
< preference name =AndroidPersistentFileLocationvalue =兼容性/>如果没有此行,文件插件将使用兼容性。 / strong>作为默认。如果存在偏好标记,且不其中一个值,应用程序将不开始。
在iOS上
将这两行中的一行添加到 config.xml:
< preference name =iosPersistentFileLocationvalue =Library/>
< preference name =iosPersistentFileLocationvalue =Compatibility/>
如果没有此行,文件插件将使用兼容性作为默认。如果存在偏好标记,且不其中一个值,应用程序将不开始。
强烈建议您阅读 API文档
I want to create folder inside the internal storage(android/data/com.AppName) in android and similarly for IOS. How to do that using phonegap?
Similarly what is the internal storage path for ios?
解决方案 On Android: as per official API docs
add one of these two lines to config.xml:
<preference name="AndroidPersistentFileLocation" value="Internal" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
Without this line, the File plugin will use Compatibility as the default. If a preference tag is present, and is not one of these values, the application will not start.
On iOS
add one of these two lines to config.xml:
<preference name="iosPersistentFileLocation" value="Library" />
<preference name="iosPersistentFileLocation" value="Compatibility" />
Without this line, the File plugin will use Compatibility as the default. If a preference tag is present, and is not one of these values, the application will not start.
Strongly recommended to read API docs before starting.
这篇关于在内部存储器中创建文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!