Node If Path Exists

[Solved] Node If Path Exists | Ruby - Code Explorer | yomemimo.com
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

Answers related to node if path exists

Code Explorer Popular Question For Ruby