Puli\Repository\FilesystemRepository::clear PHP Method

clear() public method

public clear ( )
    public function clear()
    {
        $iterator = $this->getDirectoryIterator($this->baseDir);
        $removed = 0;
        // Batch-delete all versions
        $this->clearVersions();
        foreach ($iterator as $filesystemPath) {
            $this->removeResource($filesystemPath, $removed);
        }
        $this->storeVersion($this->get('/'));
        return $removed;
    }