Table of Contents

Class FileInfoExtensions

Namespace
Songhay.Extensions
Assembly
SonghayCore.dll

Extension of FileInfo

public static class FileInfoExtensions
Inheritance
FileInfoExtensions
Inherited Members

Methods

ReadZipArchiveEntries(FileInfo, Action<string>)

Read zip archive entries.

public static void ReadZipArchiveEntries(this FileInfo archiveInfo, Action<string> fileAction)

Parameters

archiveInfo FileInfo

The FileInfo.

fileAction Action<string>

The file action.

Remarks

Use entriesProjector for any filtering or sorting.

ReadZipArchiveEntries(FileInfo, Action<string>, Func<ReadOnlyCollection<ZipArchiveEntry>, IEnumerable<ZipArchiveEntry>>)

Read zip archive entries.

public static void ReadZipArchiveEntries(this FileInfo archiveInfo, Action<string> fileAction, Func<ReadOnlyCollection<ZipArchiveEntry>, IEnumerable<ZipArchiveEntry>> entriesProjector)

Parameters

archiveInfo FileInfo

The FileInfo.

fileAction Action<string>

The file action.

entriesProjector Func<ReadOnlyCollection<ZipArchiveEntry>, IEnumerable<ZipArchiveEntry>>

The entries projector.

Remarks

Use entriesProjector for any filtering or sorting.

ReadZipArchiveEntriesByLine(FileInfo, Action<int, string>)

Read zip archive entries as strings, line by line.

public static void ReadZipArchiveEntriesByLine(this FileInfo archiveInfo, Action<int, string> lineAction)

Parameters

archiveInfo FileInfo

The file and/or directory info.

lineAction Action<int, string>

The line action.

Remarks

This member is designed for compressed text documents that are too large to load into memory. The fileAction includes the line number and the current line.

ReadZipArchiveEntriesByLine(FileInfo, Action<int, string>, Func<ReadOnlyCollection<ZipArchiveEntry>, IEnumerable<ZipArchiveEntry>>)

Read zip archive entries as strings, line by line.

public static void ReadZipArchiveEntriesByLine(this FileInfo archiveInfo, Action<int, string> lineAction, Func<ReadOnlyCollection<ZipArchiveEntry>, IEnumerable<ZipArchiveEntry>> entriesProjector)

Parameters

archiveInfo FileInfo

The file and/or directory info.

lineAction Action<int, string>

The line action.

entriesProjector Func<ReadOnlyCollection<ZipArchiveEntry>, IEnumerable<ZipArchiveEntry>>

The filter zip archive entries.

Remarks

This member is designed for compressed text documents that are too large to load into memory. The fileAction includes the line number and the current line.

UseZipArchive(FileInfo, Action<ZipArchive?>)

Centralizes the use of ZipArchive

public static void UseZipArchive(this FileInfo archiveInfo, Action<ZipArchive?> archiveAction)

Parameters

archiveInfo FileInfo
archiveAction Action<ZipArchive>

UseZipArchiveEntries(FileInfo, Action<ReadOnlyCollection<ZipArchiveEntry>>)

Centralizes the use of ReadOnlyCollection<T>.

public static void UseZipArchiveEntries(this FileInfo archiveInfo, Action<ReadOnlyCollection<ZipArchiveEntry>> entriesAction)

Parameters

archiveInfo FileInfo
entriesAction Action<ReadOnlyCollection<ZipArchiveEntry>>

UseZipArchiveEntries(FileInfo, Action<ReadOnlyCollection<ZipArchiveEntry>>, Func<ReadOnlyCollection<ZipArchiveEntry>, ReadOnlyCollection<ZipArchiveEntry>>)

Centralizes the use of ReadOnlyCollection<T>.

public static void UseZipArchiveEntries(this FileInfo archiveInfo, Action<ReadOnlyCollection<ZipArchiveEntry>> entriesAction, Func<ReadOnlyCollection<ZipArchiveEntry>, ReadOnlyCollection<ZipArchiveEntry>> entriesProjector)

Parameters

archiveInfo FileInfo
entriesAction Action<ReadOnlyCollection<ZipArchiveEntry>>
entriesProjector Func<ReadOnlyCollection<ZipArchiveEntry>, ReadOnlyCollection<ZipArchiveEntry>>

WriteZipArchiveEntry(FileInfo, FileInfo)

Write zip archive entry with Optimal.

public static void WriteZipArchiveEntry(this FileInfo archiveInfo, FileInfo fileInfo)

Parameters

archiveInfo FileInfo

The file and/or directory info.

fileInfo FileInfo

The file information.

WriteZipArchiveEntry(FileInfo, FileInfo, CompressionLevel)

Write zip archive entry.

public static void WriteZipArchiveEntry(this FileInfo archiveInfo, FileInfo fileInfo, CompressionLevel compressionLevel)

Parameters

archiveInfo FileInfo

The file and/or directory info.

fileInfo FileInfo

The file information.

compressionLevel CompressionLevel

The CompressionLevel