Click or drag to resize

PackageInfoRemovePackageZipFileIfLengthOrHashDiffer(FileInfo) Method

Removes the package's zip file if its length or hash does not match the expected values.

Namespace: Altaxo.Serialization.AutoUpdates
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3618.0 (4.8.3618.0)
Syntax
C#
public string? RemovePackageZipFileIfLengthOrHashDiffer(
	FileInfo fileInfo
)

Parameters

fileInfo  FileInfo
The file information of the package's zip file to verify and potentially remove. Cannot be null.

Return Value

String
The full path of the removed file if it was deleted; otherwise, null.
Remarks
This method verifies the integrity of the file at the specified path by checking its length and hash. If the verification fails, the file is deleted. No exception is thrown if the file cannot be deleted.
See Also