const fs = ruquire('fs')
const path = require('path')
function getFileByPath(fpath,sucCb,errCb) {
fs.readfile(fpath, 'utf-8', (err,dataStr) => {
if (err) return errCb(err)
sucCb(dataStr)
})
}
getFileByPath(path,join(__dirname, './files/1.txt'),function(data){
console.log(data + '成功了')
},function (err) {
console.log('失败了' + err.message)
})