Skip to content

IOFile.Read Method

Overloads

Name Description
Read(String, IReadOnlyList<IOFileFormat>) Reads a file from disk.
Read(String, Stream, IReadOnlyList<IOFileFormat>) Reads a file from a stream.

Read(String, IReadOnlyList<IOFileFormat>)

Reads a file from disk.

public static IOFile Read(string filename, params IReadOnlyList<IOFileFormat> possibleFormats);

View source

Parameters

Name Type Description
filename String The path to the file to read.
possibleFormats IReadOnlyList<IOFileFormat> The possible formats the file could be in.

Returns

IOFile

The file that was read.

Read(String, Stream, IReadOnlyList<IOFileFormat>)

Reads a file from a stream.

public static IOFile Read(string filename, Stream stream, params IReadOnlyList<IOFileFormat> possibleFormats);

View source

Parameters

Name Type Description
filename String The filename, used to determine the format from the extension.
stream Stream The stream to read from.
possibleFormats IReadOnlyList<IOFileFormat> The possible formats the file could be in.

Returns

IOFile

The file that was read.