src/PublicSuffixList.php
public function clearDataDirectory($cacheOnly = false)
    {
        $dir = __DIR__ . $this->dataDir;
        if (is_dir($dir)) {
            if ($dirHandle = opendir($dir)) {
                while (($file = readdir($dirHandle)) !== false) {
                    if (filetype($dir . $file) === 'file'
                        && (false === $cacheOnly || $this->startsWith($file, $this->cachedPrefix))) {
                        unlink($dir . $file);
                    }
                }
                closedir($dirHandle);
            }
        }
    }
public function clearDataDirectory($cacheOnly = false)
    {
        $dir = __DIR__ . $this->dataDir;
        if (is_dir($dir)) {
            if ($dirHandle = opendir($dir)) {
                while (($file = readdir($dirHandle)) !== false) {
                    if (filetype($dir . $file) === 'file'
                        && (false === $cacheOnly || $this->startsWith($file, $this->cachedPrefix))) {
                        unlink($dir . $file);
                    }
                }
                closedir($dirHandle);
            }
        }
    }
public function clearDataDirectory ( $ cacheOnly = false ) { $ dir = __DIR__ . $ this -> dataDir ; if ( is_dir ( $ dir ) ) { if ( $ dirHandle = opendir ( $ dir ) ) { while ( ( $ file = readdir ( $ dirHandle ) ) !== false ) { if ( filetype ( $ dir . $ file ) === 'file' && ( false === $ cacheOnly || $ this -> startsWith ( $ file , $ this -> cachedPrefix ) ) ) { unlink ( $ dir . $ file ) ; } } closedir ( $ dirHandle ) ; } } }
Delete files in the data directory

@param bool $cacheOnly true to limit clearing to cached serialized PSLs, false to clear all

@return void
Delete files in the data directory