Reset directory name pointer

@return bool
548750
public function dir_rewinddir()
    {
        if ($this->dirHandle === null) {
            return false;
        }
        self::restore();
        rewinddir($this->dirHandle);
        self::register();
        return true;
    }
824705
function Reset()
	{
		$this->_where=null;
		$this->_saved = false;
		$this->_lasterr = false;
		$this->_original = false;
		$vars=get_object_vars($this);
		foreach($vars as $k=>$v){
			if(substr($k,0,1)!=='_'){
				$this->{$k}=null;
			}
		}
		$this->foreignName=strtolower(get_class($this));
		return true;
	}
272373
public function deleteDirs()
    {
        $dirs = $this->files->directories($this->basePath);

        foreach ($dirs as $dir) {
            $this->files->deleteDirectory($dir);
        }

        $this->info('Subdirectories deleted');
    }
867497
protected function clearCache()
    {
        $oldCacheDirName = "{$this->cacheDir}_old";
        $this->fs->rename($this->cacheDir, $oldCacheDirName);
        $this->fs->remove($oldCacheDirName);
    }
650638
public function dir_readdir()
    {
        $dir = $this->dirIterator->current();
        if (null === $dir) {
            return false;
        }

        $this->dirIterator->next();
        return $dir->getName();
    }
1134288
protected function cleanupDirectory()
    {
        if (empty($this->sitemapDir)) {
            throw new \Exception('Basedir not set');
        }

        $fullPath = PATH_site . '/' . $this->sitemapDir;

        if (!is_dir($fullPath)) {
            Typo3GeneralUtility::mkdir($fullPath);
        }

        foreach (new \DirectoryIterator($fullPath) as $file) {
            if ($file->isFile() && !$file->isDot()) {
                $fileName = $file->getFilename();
                unlink($fullPath . '/' . $fileName);
            }
        }
    }
999047
public function clear()
    {
        $result = true;
        $dir = new \DirectoryIterator($this->path);
        foreach ($dir as $file) {
            $extension = pathinfo($file->getFilename(), PATHINFO_EXTENSION);
            if (!$file->isDot() && $extension === 'ser') {
                if (!@unlink($this->path.'/'.$file->getFilename())) {
                    $result = false;
                }
            }
        }

        return $result;
    }
755661
def _clear_dir(dirName):
    
    # If we got here, clear dir  
    for fname in os.listdir(dirName):
        try:
            os.remove( os.path.join(dirName, fname) )
        except Exception:
            pass
    try:
        os.rmdir(dirName)
    except Exception:
        pass
252103
public function reset()
    {
        /** @var $result CallResult */
        $result = $this->getSvn()->{'revert'}($this->getRepositoryPath(), array(
            '--recursive',
            '--',
            '.'
        ));
        $result->assertSuccess(sprintf('Cannot reset "%s"', $this->getRepositoryPath()));

        $status = $this->getStatus();
        foreach ($status as $item) {
            $file   = $this->resolveFullPath($item['file']);
            if (@unlink($file) !== true || $item['status'] !== 'unversioned') {
                throw new \RuntimeException('Cannot delete file "'.$item['file'].'"');
            }
        }
    }
324588
def reset(self, total_size=None):
        """"""
        self.root = FakeDirectory(self.path_separator, filesystem=self)
        self.cwd = self.root.name

        self.open_files = []
        self._free_fd_heap = []
        self._last_ino = 0
        self._last_dev = 0
        self.mount_points = {}
        self.add_mount_point(self.root.name, total_size)
        self._add_standard_streams()
783024
protected function clearDirectory($path)
    {
        $iterator = new \DirectoryIterator($path);

        /** @var \DirectoryIterator $fileinfo */
        foreach ($iterator as $fileinfo) {
            if ($fileinfo->isDot()) {
                continue;
            }

            if ($fileinfo->isFile() || $fileinfo->isLink()) {
                @unlink($fileinfo->getPathname());
            } elseif ($fileinfo->isDir()) {
                $this->clearDirectory($fileinfo->getPathname());
            }
        }
    }
938788
public function dir_readdir()
    {
        $node = $this->currentlyOpenedDir->iterator()->current();
        if (!$node) {
            return false;
        }
        $this->currentlyOpenedDir->iterator()->next();

        return $node->basename();
    }
1337046
public function flush() {
		$pattern = $this->getCachePath() . DIRECTORY_SEPARATOR . $this->prefix . '_*';
		
		if (self::isExecAvailable()) {
			exec('rm ' . $pattern);
			return true;
		}
		
		$list = glob($pattern);
		
		if ($list === false) {
			return false;
		}
		
		if (empty($list)) {
			return true;
		}
		
		$result = true;
		
		foreach ($list as $path) {
			if (! unlink($path)) {
				$result = false;
			}
		}
		
		return $result;
	}
714484
public function clearCache()
    {
        $cachePath = $this->cachePath();

        if (!file_exists($cachePath)) {
            return;
        }

        $dir = new RecursiveDirectoryIterator($cachePath, RecursiveDirectoryIterator::SKIP_DOTS);
        $files = new RecursiveIteratorIterator($dir, RecursiveIteratorIterator::CHILD_FIRST);

        foreach($files as $file) {
            $path = $file->getRealPath();
            $file->isDir() ? rmdir($path) : unlink($path);
        }
        rmdir($cachePath);
    }
741376
public function deleteDirectories( string $directory )
	{
		try {
			$allDirectories = Iterator::createInstance( $directory )->getDirectories();
		}
		catch( Exceptions\InvalidArgumentPathException $e ) { return false; }

		if( $allDirectories->isNotEmpty() )
		{
			/** @var \SplFileInfo $directoryName */
			foreach( $allDirectories as $directoryName )
			{
				$this->deleteDirectory( $directoryName->getPathname() );
			}
			return true;
		}

		return false;
	}
912317
public function clearNamespace()
    {
        if (! $this->enabled) {
            return;
        }
        $error = false;

        set_error_handler(function () use (&$error) {
            $error = true;
        }, E_WARNING);

        foreach (glob($this->getPath() . '/*.dat') as $file) {
            unlink($file);
        }
        restore_error_handler();

        return ! $error;
    }
638565
public function purge() {
        if ($this->isready) {
            $files = glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT);
            if (is_array($files)) {
                foreach ($files as $filename) {
                    @unlink($filename);
                }
            }
            $this->keys = array();
        }
        return true;
    }