在内部存储器中创建文件夹 [英] Creation of folder inside the internal storage

查看:444
本文介绍了在内部存储器中创建文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建文件夹内部存储(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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆