protected function getContentsIterative(int $parent, string $path, string $cabin) : array
{
$ret = [];
foreach ($this->getChildrenOf($parent, $cabin) as $dir) {
$list = $this->getContentsIterative((int) $dir['directoryid'], $path . '/' . $dir['name'], $cabin);
foreach ($list as $l) {
$ret[] = $l;
}
}
foreach ($this->getFilesInDirectory($parent) as $f) {
$ret[] = $path . '/' . $f['filename'];
}
return $ret;
}