[英]Cordova - How to access Device Storage?
I am developping an cordova application that contain a MP3 Player, for that, I have to get all MP3 files in the device, I know how to search in the SDCard (with cordova.file.externalRootDirectory) but, how to access to the classic Device Storage? 我正在开发一个包含MP3播放器的cordova应用程序,为此,我必须获取设备中的所有MP3文件,我知道如何在SDCard中搜索(使用cordova.file.externalRootDirectory)但是,如何访问经典设备存储? (Where there is "Android", "DCIM", "Download"... folders)
(哪里有“Android”,“DCIM”,“下载”...文件夹)
Thanks in advance. 提前致谢。
EDIT: The cordova.file.dataDirectory doesn't works 编辑:cordova.file.dataDirectory不起作用
I'm using plugin cordova-plugin-file
and it works for me to access to internal file storage 我正在使用插件
cordova-plugin-file
,它可以让我访问内部文件存储
var folderpath = cordova.file.dataDirectory + "Download/";
Android directory structure Android目录结构
More information in Apache doc Apache doc中的更多信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.