Class FileInfoConverter
This utility class is designed to make System.IO.FileInfo related conversions easier to work with.
Inheritance
System.Object
FileInfoConverter
Namespace: Cuemon.IO
Assembly: Cuemon.IO.dll
Syntax
public static class FileInfoConverter
Methods
| Improve this DocConvert<T>(String, Func<FileInfo, Byte[], T>)
Converts the specified fileName
to an instance of T
using the function delegate converter
.
Declaration
public static T Convert<T>(string fileName, Func<FileInfo, byte[], T> converter)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The fully qualified name of the file. |
System.Func<System.IO.FileInfo, System.Byte[], T> | converter | The function delegate that will handle the conversion. |
Returns
Type | Description |
---|---|
T | An instance of |
Type Parameters
Name | Description |
---|---|
T | The type of the converted object. |
Convert<T>(String, Int32, Func<FileInfo, Byte[], T>)
Converts the specified fileName
to an instance of T
using the function delegate converter
.
Declaration
public static T Convert<T>(string fileName, int bytesToRead, Func<FileInfo, byte[], T> converter)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The fully qualified name of the file. |
System.Int32 | bytesToRead | The amount of bytes to read from the specified |
System.Func<System.IO.FileInfo, System.Byte[], T> | converter | The function delegate that will handle the conversion. |
Returns
Type | Description |
---|---|
T | An instance of |
Type Parameters
Name | Description |
---|---|
T | The type of the converted object. |