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
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
archiveInfoFileInfoThe FileInfo.
fileActionAction<string>The file action.
entriesProjectorFunc<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
archiveInfoFileInfoThe file and/or directory info.
lineActionAction<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
archiveInfoFileInfoThe file and/or directory info.
lineActionAction<int, string>The line action.
entriesProjectorFunc<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
archiveInfoFileInfoarchiveActionAction<ZipArchive>
UseZipArchiveEntries(FileInfo, Action<ReadOnlyCollection<ZipArchiveEntry>>)
Centralizes the use of ReadOnlyCollection<T>.
public static void UseZipArchiveEntries(this FileInfo archiveInfo, Action<ReadOnlyCollection<ZipArchiveEntry>> entriesAction)
Parameters
archiveInfoFileInfoentriesActionAction<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
archiveInfoFileInfoentriesActionAction<ReadOnlyCollection<ZipArchiveEntry>>entriesProjectorFunc<ReadOnlyCollection<ZipArchiveEntry>, ReadOnlyCollection<ZipArchiveEntry>>
WriteZipArchiveEntry(FileInfo, FileInfo)
Write zip archive entry with Optimal.
public static void WriteZipArchiveEntry(this FileInfo archiveInfo, FileInfo fileInfo)
Parameters
WriteZipArchiveEntry(FileInfo, FileInfo, CompressionLevel)
Write zip archive entry.
public static void WriteZipArchiveEntry(this FileInfo archiveInfo, FileInfo fileInfo, CompressionLevel compressionLevel)
Parameters
archiveInfoFileInfoThe file and/or directory info.
fileInfoFileInfoThe file information.
compressionLevelCompressionLevelThe CompressionLevel