In an electron app I'm trying to transfer some files in an attached usb device.
I used usb-detection module to detect a new usb but it doesn't give any details about the mount path so how can I transfer files?
(Preferably cross platform solution)
1 Answers
Answers 1
First you can use os.platform() to define the OS with file system. Then nodejs exec to spawn a process to be able to execute bash code to actually get the list of drives. Then simply return those values and use in the code with fs. Checkout in the example here.
0 comments:
Post a Comment