📜  fs readfile promise - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:48.308000             🧑  作者: Mango

代码示例2
var Promise = require('bluebird');
var fs = Promise.promisifyAll(require('fs'));

 function getImage(index) {
     var imgPath = __dirname + "/image1" + index + ".png";
     return fs.readFileAsync(imgPath);
 }