readStream.path
流正在读取的文件路径,如在 fs.createReadStream() 的第一个参数中指定。如果 path 以字符串形式传入,那么 readStream.path 将是一个字符串。如果 path 以 <Buffer> 形式传入,那么 readStream.path 将是 <Buffer>。如果指定了 fd,则 readStream.path 将是 undefined。
【The path to the file the stream is reading from as specified in the first
argument to fs.createReadStream(). If path is passed as a string, then
readStream.path will be a string. If path is passed as a <Buffer>, then
readStream.path will be a <Buffer>. If fd is specified, then
readStream.path will be undefined.】