How to get list of document uri names from a database marklogic?
<p>Hey I am trying to get the list of all document names /uri from a given MarkLogic database.</p>

<p>I found this line in stackoverflow:
<a href="https://stackoverflow.com/questions/10654431/how-to-get-total-number-of-documents-in-marklogic-database">How to get total number of documents in Marklogic database?</a></p>

<p>...which will get the count of documents in a database.  I'm not sure how to modify this to list all document URIs.</p>

<p>Also given a document URI I wanted to see if it exists in the database?</p>

<p>I tried the following, but couldn't achieve the same</p>

<pre><code>for $x in xdmp:directory("/myDirectory/", "1")
return
fn:document-uri($x)
</code></pre>

<p>I need a Xquery command just like this. I am new to marklogic, can someone help me on this?</p>