if(file_exists("models/x.mdl")) // trueelse downloadfile("http://site.com/x.mdl" /* origin */, "models/" /* destination */)