src/fs/entity/DirEntity.php
public function getList($asStrings = false)
    {
        $list = scandir($this->path);
        if ($asStrings === true) {
            return array_diff($list, [".", ".."]);
        }

        $ret = [];
        foreach ($list as $name) {
            if ($name === "." || $name === "..") {
                continue;
            }
            $path = $this->path.DIRECTORY_SEPARATOR.$name;
            $ret[] = (is_dir($path)) ? new static($path) : new FileEntity($path);
        }
        return $ret;
    }
public function getList($asStrings = false)
    {
        $list = scandir($this->path);
        if ($asStrings === true) {
            return array_diff($list, [".", ".."]);
        }

        $ret = [];
        foreach ($list as $name) {
            if ($name === "." || $name === "..") {
                continue;
            }
            $path = $this->path.DIRECTORY_SEPARATOR.$name;
            $ret[] = (is_dir($path)) ? new static($path) : new FileEntity($path);
        }
        return $ret;
    }
get a list of the directory children

@param boolean $asStrings Only return the child entity names
@return array<string>|boolean