Loading TOC...

xdmp:filesystem-file-exists

xdmp:filesystem-file-exists(
   $pathname as xs:string,
   [$host as xs:unsignedLong?]
) as xs:boolean

Summary

Return true if a file exists on a host; otherwise false.

Parameters
$pathname Pathname of the file on a certain host.
$host ID of the host. If omitted, uses the current host ID (for example, the output of a call to xdmp:host).

Required Privileges

http://marklogic.com/xdmp/privileges/xdmp-filesystem-file-exists

Example

xdmp:filesystem-file-exists("/testdata1/a.jpg")
=> true

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

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.