I'm writing a plugin for some tool and the API is JavaScript. I need to know whether a file exists or not, and I'd like to avoid operating system calls in order to abstract from it, but using the JavaScript language instead, if possible.
Is it possible to know if a file exists locally in JavaScript, given a path?