You can use either xdmp:document-add-permissions or 
xdmp:document-set-permissions.  The former adds to the existing permission set 
for the URI, and the latter replaces the permissions with the ones you set it 
with.

-Danny

From: [email protected] 
[mailto:[email protected]] On Behalf Of Tim Meagher
Sent: Monday, October 24, 2011 10:01 AM
To: 'General MarkLogic Developer Discussion'
Subject: Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete 
return xdmp:doc-not-found

Danny,

If the directory does not have the necessary permission, how do you add it?

Thx - Tim Meagher

From: [email protected] 
[mailto:[email protected]] On Behalf Of Danny Sokolsky
Sent: Monday, October 24, 2011 12:55 PM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete 
return xdmp:doc-not-found

Hi Raghu,

I can think of 2 things to look at:



1)      Make sure the directory exists.  A directory is a properties document 
with the special directory element.  Try running the following, substituting 
the dir URI for $uri:

xdmp:document-properties($uri)

this should return a properties document with a directory element.  If it does 
not, then the directory does not exist.


2)      Make sure the user who is running the directory-delete has permissions 
to see the directory.   You can check that by looking at the permissions on the 
directory:

xdmp:document-get-permissions($uri)

Also, what version of marklogic are you running (xdmp:version() )?

-Danny


From: 
[email protected]<mailto:[email protected]>
 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
 On Behalf Of Raghu
Sent: Monday, October 24, 2011 6:20 AM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Directory exists but xdmp:directory-delete 
return xdmp:doc-not-found

Hi All,

       I'm  trying to delete a directory usind xdmp:directory-delete; it 
returns a   xdmp:doc-not-found but when I do a xdmp:directory of the same uri 
I'm able to see the documents inside the folder. These directories are created 
from a trigger. does it have anything to do with it? Should I set any document 
proerty? Please help me out.



Thanks in advance
Raghu

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to