xdmp.uriIsFile( uri as String? ) as Boolean?
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. |
xdmp.uriIsFile("/sub-directory/test.xml"); => true if test.xml exists in "sub-directory" relative to the root directory of the application server.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.