Created
July 17, 2017 16:46
-
-
Save joewiz/421cc249b10c233ed90dee145dd32f93 to your computer and use it in GitHub Desktop.
Check a collection for locked resources, in eXist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.1"; | |
(: You might've forgotten to close a document opened via WebDAV :) | |
let $col := "/db/apps/frus-dates" | |
for $resource in xmldb:get-child-resources($col) | |
let $user := xmldb:document-has-lock($col, $resource) | |
return | |
$resource || ": " || (if ($user) then $user else "(not locked)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment