public static function gdc($strPath, $booErrorRep = true)
    {
        $arrDirectoryContent = array();
        $error = PSI_Error::singleton();
        if (is_dir($strPath)) {
            if ($handle = opendir($strPath)) {
                while (($strFile = readdir($handle)) !== false) {
                    if ($strFile != "." && $strFile != "..") {
                        $arrDirectoryContent[] = $strFile;
                    }
                }
                closedir($handle);
            } else {
                if ($booErrorRep) {
                    $error->addError('opendir('.$strPath.')', 'directory can not be read by phpsysinfo');
                }
            }
        } else {
            if ($booErrorRep) {
                $error->addError('is_dir('.$strPath.')', 'directory does not exist on your machine');
            }
        }

        return $arrDirectoryContent;
    }
public static function gdc($strPath, $booErrorRep = true)
    {
        $arrDirectoryContent = array();
        $error = PSI_Error::singleton();
        if (is_dir($strPath)) {
            if ($handle = opendir($strPath)) {
                while (($strFile = readdir($handle)) !== false) {
                    if ($strFile != "." && $strFile != "..") {
                        $arrDirectoryContent[] = $strFile;
                    }
                }
                closedir($handle);
            } else {
                if ($booErrorRep) {
                    $error->addError('opendir('.$strPath.')', 'directory can not be read by phpsysinfo');
                }
            }
        } else {
            if ($booErrorRep) {
                $error->addError('is_dir('.$strPath.')', 'directory does not exist on your machine');
            }
        }

        return $arrDirectoryContent;
    }
public static function gdc ( $ strPath , $ booErrorRep = true ) { $ arrDirectoryContent = array ( ) ; $ error = PSI_Error :: singleton ( ) ; if ( is_dir ( $ strPath ) ) { if ( $ handle = opendir ( $ strPath ) ) { while ( ( $ strFile = readdir ( $ handle ) ) !== false ) { if ( $ strFile != "." && $ strFile != ".." ) { $ arrDirectoryContent [ ] = $ strFile ; } } closedir ( $ handle ) ; } else { if ( $ booErrorRep ) { $ error -> addError ( 'opendir(' . $ strPath . ')' , 'directory can not be read by phpsysinfo' ) ; } } } else { if ( $ booErrorRep ) { $ error -> addError ( 'is_dir(' . $ strPath . ')' , 'directory does not exist on your machine' ) ; } } return $ arrDirectoryContent ; }
reads a directory and return the name of the files and directorys in it

@param string  $strPath     path of the directory which should be read
@param boolean $booErrorRep en- or disables the reporting of errors which should be logged

@return array content of the directory excluding . and ..
reads a directory and return the name of the files and directorys in it