📅  最后修改于: 2022-03-11 15:03:31.177000             🧑  作者: Mango
JS
copy
const fs = require('fs')
fs.stat('/Users/joe/test.txt', (err, stats) => {
if (err) {
console.error(err)
return
}
//we have access to the file stats in `stats`
})