Changeset View
Changeset View
Standalone View
Standalone View
lib/Kolab/DAV/Collection.php
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | function getChildren() | ||||
// non-root existing folder, get files list | // non-root existing folder, get files list | ||||
if ($path_len && empty($this->data['virtual'])) { | if ($path_len && empty($this->data['virtual'])) { | ||||
try { | try { | ||||
$files = $this->backend->file_list($this->path); | $files = $this->backend->file_list($this->path); | ||||
} | } | ||||
catch (Exception $e) { | catch (Exception $e) { | ||||
} | } | ||||
foreach ($files as $filename => $file) { | foreach ((array) $files as $filename => $file) { | ||||
$path = Collection::ROOT_DIRECTORY . '/' . $filename; | $path = Collection::ROOT_DIRECTORY . '/' . $filename; | ||||
// remove path prefix | // remove path prefix | ||||
$filename = substr($filename, $path_len + 1); | $filename = substr($filename, $path_len + 1); | ||||
$this->children[$filename] = new File($path, $this, $file); | $this->children[$filename] = new File($path, $this, $file); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |