Airship\Cabin\Bridge\Blueprint\Files::getContentsIterative PHP Method

getContentsIterative() protected method

Get a list of all the files in a directory.
protected getContentsIterative ( integer $parent, string $path, string $cabin ) : array
$parent integer
$path string
$cabin string
return array
    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;
    }