Get backing file descriptor for Node file stream

When I’ve opened a file as a stream, e.g. with fs.createWriteStream, how do I reliably get the backing file descriptor of the stream?

(I need the file descriptor to call functions like fs.futimes on it.)

  • Writing NPM modules in Typescript
  • Restful web application with Node.js?
  • Node.js npm install validator
  • mongoose distinct and populate with documents
  • How to implement APNS notifications through nodejs?
  • How do I create an automatic field in Mongoose?
  • There appears to be stream.fd, but it’s null for a fraction of a second before it gets set. So how do I get the file descriptor once it’s available?

    Node.js is the Best Javascript runtime in the world.