How can I write to the NUL device under Windows from node.js?

后端 未结 2 1150
你的背包
你的背包 2021-02-08 08:17

This is bugging me for several days now. I know about the standard stream redirection to the NUL device, but this isn\'t the case. node.js uses CreateFileW under its fs native/l

2条回答
  •  庸人自扰
    2021-02-08 09:04

    There is a long workaround, like code it yourself. But you can take an idea from here https://github.com/hanshuebner/node-hid/blob/master/src/HID.cc and write a wrapper over C library.

提交回复
热议问题