fed*_*asu 2 javascript stream node.js
这是我想做的:
stream = fs.WriteStream('crap.txt',{flags:'w'};
// more code
response.on('close',function() {
// is the below line possible?
fs.stat(stream.name, function(stats) {
console.log(stats.size);
});
stream.end();
});
Run Code Online (Sandbox Code Playgroud)
那么我可以从流对象获取文件名吗?结合可写流上的优秀教程/文档(包含示例),一个示例性示例将是一个不错的选择。
| 归档时间: |
|
| 查看次数: |
3912 次 |
| 最近记录: |