Here is the code I used in an admin-plugin to list drafts. I guess you could to nearly the same thing,
just fix some of the paths if you want to list locks instead.
I'm guessing you won't need that unserialize part either...
//Falkor
function html() {
global $ID;
$result = array();
$dokupath='path/to/dokuwiki'
$path = $dokupath.'/data/cache';
$result = $this->findDrafts($path,$result);
echo "<h1>Current drafts in wiki</h1>\n";
foreach($result as $r){
$file=unserialize(file_get_contents($r));
#$file=deserialize(IO_readfile($r));
if(!empty($file['prefix'])){
$page = $file['prefix'].":".$file['id'];
}else{
$page = $file['id'];
}
echo "<h3>".$page."</h3>\n";
echo "<p> by user: ".$file['client']."</p>\n";
echo "<a href=\"".DOKU_BASE."doku.php?do=draft&id=".$page."\">Resume</a>\n";
}
}
function findDrafts($dir, $result){
$dirs = glob($dir . '/*', GLOB_ONLYDIR);
$drafts = glob($dir . '/*.draft');
if($drafts){
$result = array_merge($result, $drafts);
}
foreach($dirs as $d){
$result = $this->findDrafts($d, $result);
}
return $result;
}