private function doClearFile(&$ok, \SplFileInfo $file, $prefix): void
    {
        $keys = [];

        if ($file->isFile()) {
            $key = $this->getFileKey($file);

            if (null !== $key && ('' === $prefix || 0 === strpos($key, $prefix))) {
                $keys[] = $key;
            }
        }

        $ok = ($file->isDir() || $this->deleteItems($keys) || !file_exists($file)) && $ok;
    }