美文网首页
Node.js查看文件信息

Node.js查看文件信息

作者: pokeey | 来源:发表于2018-07-16 17:20 被阅读0次
const fs = require('fs')

// fs.stat('index.js',(error,stats)=> {
//   if (error) {
//     console.log(error);
//
//   } else {
//     console.log(stats);
//     console.log(`文件:${stats.isFile()}`);
//     console.log(`目录:${stats.isDirectory()}`);
//
//   }
//
// });

相关文章

网友评论

      本文标题:Node.js查看文件信息

      本文链接:https://www.haomeiwen.com/subject/sgibpftx.html