FileExists(filePath) Last updated: 16. May 2023

API only function

Check whether a file exists or not within the site.


Name Type Description
filePath string Aboslute path to file to check if exists.


True if the file exists otherwise false.


Code example (JS)

JS is normal JavaScript either running in the browser or on the Docly™ server.
if (docly.fileExists("folder/file1")) 
    write("The file exists!");