Tag: 文件属性

nodejs fs模式操作在windows只读属性中

我是NodeJS的新手,我很难解密模式值,并找出如何改变模式来删除像只读属性。 这里是我如何find这个文件夹有一个16822的模式。我如何确定什么16822意味着在Windows中,然后如何更改模式,使它不具有只读ATTR? fs.mkdir('./build'); fs.stat('./build', function(err, stats){ if(stats.isDirectory()){ console.log('Its a dir'); for(var i in stats){ if('function' !== typeof stats[i]){ console.log(i + '\t= ' + stats[i]); } } } });

节点JS – 读取文件属性

我正在开发一个NWJS的桌面应用程序,我需要获取.exe文件的文件属性。 我试过使用npm属性模块https://github.com/gagle/node-properties ,但我得到一个空的对象。 properties.parse('./unzipped/File.exe', { path: true }, function (err, obj) { if (err) { console.log(err); } console.log(obj); }); 我需要得到“文件版本”属性: 我也尝试使用fs.stats,没有运气。 有任何想法吗?