Skip to content

IOFile Class

Definition

Base class for a file of a given format.

public abstract class IOFile

View source

Constructors

Name Description
IOFile(IOFileFormat) Initialises a new instance of the IOFile class.

Properties

Name Description
Format Gets the format of this file.

Methods

Name Description
LoadInto(Span<Byte>) Loads the file data into the specified memory span.
Read(String, IReadOnlyList<IOFileFormat>) Reads a file from disk.
Read(String, Stream, IReadOnlyList<IOFileFormat>) Reads a file from a stream.
TryLoadInto(Span<Byte>) Attempts to load the file data into the specified memory span.
Write(String, Boolean) Writes this file to disk.
Write(String, String, Boolean) Writes this file to a directory with the specified name.
Write(Stream) Writes this file to a stream.
Write() Writes this file to a byte array.