Table of Contents

Class FileInfoExtensions

Namespace
Cuemon.Extensions.Data.Integrity
Assembly
Cuemon.Extensions.Data.Integrity.dll

Extension methods for the System.IO.FileInfo class.

public static class FileInfoExtensions
Inheritance
Object
FileInfoExtensions

Methods

GetCacheValidator(FileInfo, Func<Hash>, Action<FileChecksumOptions>)

Returns a CacheValidator from the specified file.

public static CacheValidator GetCacheValidator(this FileInfo file, Func<Hash> hashFactory = null, Action<FileChecksumOptions> setup = null)

Parameters

file FileInfo

The System.IO.FileInfo to extend.

hashFactory Func<Hash>

The function delegate that is invoked to produce the HashResult. Default is CreateFnv128(Action<FowlerNollVoOptions>).

setup Action<FileChecksumOptions>

The FileChecksumOptions which may be configured.

Returns

CacheValidator

A CacheValidator that represents either a weak, medium or strong integrity check of the specified file.

Remarks

Should the specified file trigger any sort of exception, a Default is returned.

Exceptions

System.ArgumentNullException

file is null.