Classes/Settings/Settings.php
protected function retrieveFiles(string $directory): array
    {
        $files = [];

        foreach (scandir($directory) as $file) {
            $elem = $this->pathHelper->join($directory, $file);

            if (
                $elem != '.' &&
                $elem != '..' &&
                \is_file($elem) &&
                \is_readable($elem) &&
                $this->stringHelper->endsWith($elem, '.yaml')
            ) {
                $files[] = $elem;
            }
        }

        if (count($files) == 0) {
            throw new FileSystemException('Path does not contain any readable yaml files!', 1527452904);
        }

        return $files;
    }
protected function retrieveFiles(string $directory): array
    {
        $files = [];

        foreach (scandir($directory) as $file) {
            $elem = $this->pathHelper->join($directory, $file);

            if (
                $elem != '.' &&
                $elem != '..' &&
                \is_file($elem) &&
                \is_readable($elem) &&
                $this->stringHelper->endsWith($elem, '.yaml')
            ) {
                $files[] = $elem;
            }
        }

        if (count($files) == 0) {
            throw new FileSystemException('Path does not contain any readable yaml files!', 1527452904);
        }

        return $files;
    }
protected function retrieveFiles ( string $ directory ) : array { $ files = [ ] ; foreach ( scandir ( $ directory ) as $ file ) { $ elem = $ this -> pathHelper -> join ( $ directory , $ file ) ; if ( $ elem != '.' && $ elem != '..' && \ is_file ( $ elem ) && \ is_readable ( $ elem ) && $ this -> stringHelper -> endsWith ( $ elem , '.yaml' ) ) { $ files [ ] = $ elem ; } } if ( count ( $ files ) == 0 ) { throw new FileSystemException ( 'Path does not contain any readable yaml files!' , 1527452904 ) ; } return $ files ; }
Retrieve all yaml files from a directory.

@param string $directory The directory to scan

@return array

@throws FileSystemException
Retrieve all yaml files from a directory .