How do I format a drive (aka usb stick/external hdd) with Nodejs without having to use cli/cmd/child_proccess?

I'm creating a small tool with nodejs that needs to clear a hdd before adding some files onto it, but I can't find any library that allows me asynchronous (or synchronous for that matter) access to those tools.

有帮助吗?

解决方案

I ended up using child_process and writing a library that lets you set responders for certain outputs semantically similar to node-suppose by jprichardson, Called respond (Can be installed by npm install respond - Documentation here: https://github.com/schme16/node-respond/blob/master/README.md)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top