Question : node if path exists
Answered by : witty-worm-m89kw5adzzo2
const fs = require("fs"); // Or `import fs from "fs";` with ESM
if (fs.existsSync(path)) { // Do something
}
Source : https://stackoverflow.com/questions/4482686/check-synchronously-if-file-directory-exists-in-node-js | Last Update : Fri, 29 May 20