Skip to content

IOFileFormat Class ​

Definition ​

Base class for file formats, providing information about the format and methods for reading and writing files.

c#
public abstract class IOFileFormat

View source

Constructors ​

NameDescription
IOFileFormat(String, String, Type)Initializes a new instance of the IOFileFormat class.

Properties ​

NameDescription
CanReadGets a value indicating whether this format supports reading.
CanWriteGets a value indicating whether this format supports writing.
FileExtensionGets the file extension for this format, without a leading dot.
FileTypeGets the type of IOFile for this format.
NameGets the display name of this format.

Methods ​

NameDescription
CreateConverters()Creates the converters for this format.
GetFilename(String)Gets the filename for a file of this format with the specified name.
Load(String, IReadOnlyList<IOFileFormat>)Loads a file from disk.
Load(String, Stream, IReadOnlyList<IOFileFormat>)Loads a file from a stream. Use as an alternative to Load(String, IReadOnlyList<IOFileFormat>) when the file is not on disk, for example web upload.
LoadAsync(String, IReadOnlyList<IOFileFormat>, CancellationToken)Loads a file from disk asynchronously.
LoadAsync(String, Stream, IReadOnlyList<IOFileFormat>, CancellationToken)Loads a file from a stream asynchronously. Use as an alternative to LoadAsync(String, IReadOnlyList<IOFileFormat>, CancellationToken) when the file is not on disk, for example web upload.
Read(Byte[])Reads a file from a byte array.
Read(Stream)Reads a file from a stream.
ReadAsync(Stream, CancellationToken)Reads a file from a stream asynchronously.
ReadAsync(IBinaryReader)Reads a file from an IBinaryReader.
WriteAsync(IOFile, IBinaryWriter)Writes a file to a IBinaryWriter asynchronously.