Loading TOC...

xdmp:uri-is-file

xdmp:uri-is-file(
   $uri as xs:string?
) as xs:boolean?

Summary

Returns true if a given URI refers to a file which exists on the current application server. Only returns true if the modules on the App Server is set to file system; always returns false if you are using a database for your modules. false Returns false if the file does not exist. Returns the empty sequence if the URI is the empty sequence.

Parameters
$uri The URI to check. If the URI begins with a "/", it is relative to the root directory of the application server. Otherwise, it is relative to the current request URI.

Example

xdmp:uri-is-file("apppages/test.xml")
=> true if test.xml exists in "apppages" sub-directory
   relative to the directory of the file containing the request.

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.