function buildStructure($rootFolder, $depth) { self::$depth = $depth; $structure = []; if (($path = realpath($rootFolder)) !== false) { $structure = $this->_recursiveRead($path); } return $structure; }