Answer the question
In order to leave comments, you need to log in
How to determine through NodeJS that a flash drive is connected?
You need to somehow determine whether the flash drive is connected or not, and detect this moment.
Answer the question
In order to leave comments, you need to log in
With a cursory review, AngloGoogle gave out 2 topics worthy of attention.
The first one talks about the impossibility of such a feint if javascript is running inside the browser - link .
In the second, they throw links to the github with a ready-made solution - link .
Search term - "detect flash drive node js"
If under Windows:
1. You can regularly poll the desired drive letter where the chip should appear when it was possible to request a list of directories, so it is connected.
2. Write your module in C for this, then the question will go into how to determine in C whether a flash drive is connected.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question