Get children of the path.

@param string $path

@return Collection
431719
public function children($path)
    {
        $children = $this->children[(string)$path] ?? [];

        return new Collection($children, [], $this);
    }
252410
public function getMultipleChildren(array $paths)
    {
        $objs = $this->caldavBackend->getMultipleCalendarObjects($this->calendarInfo['id'], $paths);
        $children = [];
        foreach ($objs as $obj) {
            $obj['acl'] = $this->getChildACL();
            $children[] = new CalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
        }

        return $children;
    }
696136
public function get($path) {
		if (!$this->paths->has($path)) {
			$this->paths->set($path, new Path($path));
		}
		return $this->paths->get($path);
	}
195278
public function getPhpFiles(array $paths): FileCollection
    {
        $this->files = new FileCollection;
        foreach ($paths as $path) {
            $this->getPhpFilesFromPath($path);
        }

        return $this->files;
    }
383945
private function get_files_from_folders( $path ) {

		$items = $this::get_folder_contents( $path );

		foreach ( $items as $type => &$location ) {
			$location = $this::get_folder_contents( trailingslashit( $location ) );
			sort( $location );
		}

		return $items;
	}
73431
protected function getPhpFiles($path)
    {
        if (is_dir($path)) {
            return new RegexIterator(
                new RecursiveIteratorIterator(
                    new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),
                    RecursiveIteratorIterator::SELF_FIRST,
                    RecursiveIteratorIterator::CATCH_GET_CHILD // Ignore "Permission denied"
                ),
                '/^.+\.php$/i',
                RecursiveRegexIterator::GET_MATCH
            );
        }
        else {
            return [];
        }
    }
808760
public function _pathAsArray($path)
    {
        $result = explode(self::PS, $path);
        // unset empty nodes
        foreach ($result as $key => $item) {
            if (!$item && $item !== "0") {
                unset($result[$key]);
            }
        }
        // re-index array
        $result = array_values($result);
        return $result;
    }
1209888
public function getNode($path)
    {
        // init
        $chunks = $this->splitPath($path);

        // action
        $curObj = $this;
        foreach ($chunks as $chunk) {
            // check, if attributes exist
            $regs = array();
            preg_match('/^([a-z]+)(?:\[(.*)\])?$/i', $chunk, $regs);

            // if there are attributes, store them in array
            $chunkAttributes = array();
            if (sizeof($regs) > 2) {
                // get chunk name
                $chunk = $regs[1];

                // get attributes
                $tmpAttributes = preg_split('/\,/', $regs[2]);
                for ($i = 0; $i < sizeof($tmpAttributes); $i++) {
                    list($key, $value) = preg_split('/\=/', $tmpAttributes[$i]); // split into key = value
                    $key = substr($key, 1, strlen($key) - 1); // remove @
                    $value = trim($value, '\''); // remove ''
                    $chunkAttributes[$key] = $value; // add to attributes list
                }
            }

            if (($curObj = $curObj->getChildNode($chunk, $chunkAttributes)) != null) {
                // zuweisung schon oben in if-block schon erfolgt
            } else {
                throw new ChildDoesNotExistException('Child node "'.$chunk.'" '.' ("'.$path.'") does not exist.');
            }
        }

        // return
        return $curObj;
    }
1013985
public function getNodeForPath($path)
    {
        $path = trim($path, '/');
        if (isset($this->cache[$path])) {
            return $this->cache[$path];
        }

        // Is it the root node?
        if (!strlen($path)) {
            return $this->rootNode;
        }

        // Attempting to fetch its parent
        list($parentName, $baseName) = Uri\split($path);

        // If there was no parent, we must simply ask it from the root node.
        if ('' === $parentName) {
            $node = $this->rootNode->getChild($baseName);
        } else {
            // Otherwise, we recursively grab the parent and ask him/her.
            $parent = $this->getNodeForPath($parentName);

            if (!($parent instanceof ICollection)) {
                throw new Exception\NotFound('Could not find node at path: '.$path);
            }
            $node = $parent->getChild($baseName);
        }

        $this->cache[$path] = $node;

        return $node;
    }
1153383
public function getAllFiles($path){
        $fullpath = $this->getFullPath().$path;
        if(file_exists($fullpath)){
            $file = new \SplFileInfo($fullpath);
            if($file->isDir()){
                $r = array();
                // if($path != "/") $r[] = $this->folderParent($path);
                $finder = new Finder();
                $directories = $finder->notName($this->config['folder_thumb']);
                if (count($this->config['folder_excludes'])>0) {
                    foreach ($this->config['folder_excludes'] as $value) {
                        $directories = $finder->notName($value);
                    }
                }
                //$directories = $directories->notName('web.config')->notName('.htaccess')->depth(0)->sortByType();
                $directories = $directories->notName('web.config')->notName('.htaccess')->depth(0)->sort(
                    function ($a, $b) {return $b->getMTime() - $a->getMTime();}
                    );
                // $directories = $directories->files()->name('*.jpg');
                $directories = $directories->in($fullpath);
                foreach ($directories as $key => $directorie) {
                    $namefile = $directorie->getFilename();
                    if($directorie->isDir() && $this->validNameFile($namefile,false)){
                        $t = $this->dirInfo($directorie,$path);
                        if($t) $r[] = $t;
                    }elseif($directorie->isFile() && $this->validNameFile($namefile)){
                        $t = $this->fileInfo($directorie,$path);
                        if($t) $r[] = $t;
                    }
                }
                return $r;
            }elseif($file->isFile()){
                $t = $this->fileInfo($file,$path);
                if($t){
                    return $t;
                }else{
                    $result = array("query"=>"BE_GETFILEALL_NOT_LEIBLE","params"=>array());
                    $this->setInfo(array("msg"=>$result));
                    if( $this->config['debug'] ) $this->_log(__METHOD__." - Archivo no leible - $fullpath");
                    return;
                }
            }elseif($file->isLink()){
                $result = array("query"=>"BE_GETFILEALL_NOT_PERMITIDO","params"=>array());
                $this->setInfo(array("msg"=>$result));
                if( $this->config['debug'] ) $this->_log(__METHOD__." - path desconocido - $fullpath");
                return ;
            }
        }else{
            $result = array("query"=>"BE_GETFILEALL_NOT_EXISTED","params"=>array());
            $this->setInfo(array("msg"=>$result));
            if( $this->config['debug'] ) $this->_log(__METHOD__." - No existe el archivo - $fullpath");
            return ;
        }
    }
1309347
public function get(string $path, $default = null)
    {
        $array = $this->items;

        if (!empty($path)) {
            $keys = $this->explode($path);
            foreach ($keys as $key) {
                if (!array_key_exists($key, $array)) {
                    return $default;
                }
                $array = $array[$key];
            }
        }

        return $array;
    }
706190
public function loadNode($path) {
        $list = @$this->zookeeper->getChildren($path);
        if(!empty($list)) {
            $data = [];
            foreach($list as $key) {
                $value = $this->zookeeper->get($path . '/' . $key);
                if(!empty($value)) {
                    $data[$key] = $value;
                }else {
                    $data[$key] = $this->loadNode($path . '/' . $key);
                }
            }
            return $data;
        }else {
            $value = @$this->zookeeper->get($path);
            return $value;
        }
    }
998544
public function getKeys($path)
    {
        if (empty($path)) {
            return array_keys($this->map->getContainer());
        }
        $value = $this->map[$path];
        if (is_array($value)) {
            return array_keys($value);
        } else {
            return false;
        }

    }
1254648
public function in($path)
    {
        $finder = $this->getSymfonyFinder()
            ->in($path)
            ->files()
            ->name('ruleset.xml')
            ->sortByName();
        $paths = iterator_to_array($finder, false);
        $paths = array_map(
            function (\SplFileInfo $file) {
                return $file->getPath();
            },
            $paths
        );

        return $this->createStandardsFromPaths($paths);
    }
40521
public static function ls($path): array
    {
        $list = [];

        try {
            /*** class create new DirectoryIterator Object ***/
            foreach (new DirectoryIterator($path) as $item) {
                $list[] = $item;
            }
            /*** if an exception is thrown, catch it here ***/
        } catch (\Exception $e) {
            throw new FileNotFoundException($path . ' 没有任何内容');
        }

        return $list;
    }
651119
public function children($path = "")
  {
    if ($path) {
      $parts = $this->split($path);
      $name = array_shift($parts);

      $children = array();
      if (isset($this->_subTrees[$name])) {
        $subtree = $this->_subTrees[$name];
        /* @var $subtree Wrapper_FS_Changes */
        $this->_appendChildren(
          $children, $name, $subtree->children($parts)
        );
      }
    } else {
      $children = $this->own();
      foreach ($this->_subTrees as $name => $subtree) {
        /* @var $subtree Wrapper_FS_Changes */
        $this->_appendChildren(
          $children, $name, $subtree->children()
        );
      }
    }

    return $children;
  }
639936
public function getSection($path = null)
	{
		if ($path !== null) {
			$parts = explode('.', $path);
			return (count($parts) == 1) ? 'PHP' : $parts[0];
		} else {
			return $this->section;
		}
	}