📅  最后修改于: 2022-03-11 15:03:21.348000             🧑  作者: Mango
function listFiles(cb) {
s3.stuff(params, cb);
}
function downlaodFile(key, cb) {
s3.stuff(key, cb);
}
listFiles(function (err, fileKeys) {
if (err) {
throw err;//don't really but this is just an example
}
async.each(fileKeys, downloadFile, function done(err) {
if (err) {
throw err;
}
});
});