FileExists(filePath) Last updated: 22. Nov 2024

Check whether a file exists or not within the site.

Parameters

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

Returns

True if the file exists otherwise false.

Example

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!");