Nette\Caching\Storages\FileStorage::delete PHP Method

delete() private static method

Deletes and closes file.
private static delete ( $file, $handle = NULL ) : void
return void
    private static function delete($file, $handle = NULL)
    {
        if (@unlink($file)) {
            // @ - file may not already exist
            if ($handle) {
                flock($handle, LOCK_UN);
                fclose($handle);
            }
            return;
        }
        if (!$handle) {
            $handle = @fopen($file, 'r+');
            // @ - file may not exist
        }
        if ($handle) {
            flock($handle, LOCK_EX);
            ftruncate($handle, 0);
            flock($handle, LOCK_UN);
            fclose($handle);
            @unlink($file);
            // @ - file may not already exist
        }
    }