I also checked the ImageManager but they do it through a listener and the code is not public...
I need something like
Code:
if (FileExists('img/system/example.png')) { alert('yay'); }if (FileExists('img/system/example.png')) { alert('yay'); }var fs = require('fs');if(fs.existsSync("index.html")) { // The file exists, do stuff.} else { // The file does not exist, do other stuff.}var path = window.location.pathname.replace(/(\/www|)\/[^\/]*$/, "/add your folder name here or leave out");if (path.match(/^\/([A-Z]\:)/)) { this.path = this._path.slice(1);}path = decodeURIComponent(this._path);