无法将文件保存到特定文件夹
我想将下载的文件保存到// String path = Environment.getExternalStorageDirectory()。getPath()+ File.separator +“ App Name”;但我无法这样做。...你能帮我吗?
字符串路径= Environment.getExternalStorageDirectory()。getPath()+ File.separator +“ appname”;
Batch batch = Batch.with(new StorageRoot() {
@Override
public String path() {
return path;
}
}, DownloadBatchIdCreator.createSanitizedFrom(messageData.getMessage_id()), name)
.downloadFrom(url).saveTo("download").withIdentifier(DownloadFileIdCreator.createFrom(messageData.getMessage_id())).apply().build();
manager.download(batch);
lib链接 lib link