|
是在Android上测试的,下载列表完成以后下载文件夹里面的文件会被自动移除,但最后一个文件不会移除。
var manager = api.require('downloadManager');
$.each(config.ResourceList, function(i, e) {
manager.enqueue({
url: opt.url,
savePath: 'fs://studydownload/' + opt.savePath,
allowResume: true,
title: opt.ResourceName,
iconPath: opt.iconPath,
networkTypes:**.**workTypes
}, function(ret, err) {
if (ret) {
//alert(JSON.stringify(ret));
} else {
//alert(JSON.stringify(err));
}
});
}); |
|