createReadStream error: “OK, Open”

后端 未结 1 1477
日久生厌
日久生厌 2021-01-19 14:20

I have the following snippet of code that is in a function that gets called multiple times for different files.

var readStream = fs.createReadStream(file);
r         


        
相关标签:
1条回答
  • 2021-01-19 15:07

    Take a look at graceful-fs. This is a node module which abstracts all the fs calls you wish to make with some addtionaly features. Especially useful in windows systems.

    Usage is dead simple:

    # Install
    $ npm install graceful-fs
    
    # Usage (in foo.js)
    var fs = require('graceful-fs');
    
    0 讨论(0)
提交回复
热议问题