src/fkooman/IO/IO.php
public function readFolder($folderPath, $fileFilter = '*')
    {
        // make sure folderPath ends with '/'
        if ('/' !== substr($folderPath, -1)) {
            $folderPath .= '/';
        }
        $searchPattern = $folderPath.$fileFilter;
        $fileList = @glob($searchPattern, GLOB_MARK | GLOB_ERR);
        if (false === $fileList) {
            return [];
        }

        return $fileList;
    }
public function readFolder($folderPath, $fileFilter = '*')
    {
        // make sure folderPath ends with '/'
        if ('/' !== substr($folderPath, -1)) {
            $folderPath .= '/';
        }
        $searchPattern = $folderPath.$fileFilter;
        $fileList = @glob($searchPattern, GLOB_MARK | GLOB_ERR);
        if (false === $fileList) {
            return [];
        }

        return $fileList;
    }
public function readFolder ( $ folderPath , $ fileFilter = '*' ) { // make sure folderPath ends with '/' if ( '/' !== substr ( $ folderPath , - 1 ) ) { $ folderPath .= '/' ; } $ searchPattern = $ folderPath . $ fileFilter ; $ fileList = @ glob ( $ searchPattern , GLOB_MARK | GLOB_ERR ) ; if ( false === $ fileList ) { return [ ] ; } return $ fileList ; }
Read a folder and return a list of files in that folder.

@param string $folderPath the path to the folder
@param string $fileFilter the filter to apply, defaults to '*'

@return array an array of files and directories in the folder requested,
entries ending in a '/' are folders. If a directory does not exist, is
empty or no there is no permission to read it an empty array is returned.
Read a folder and return a list of files in that folder .