Class FileInfoPart
This class represent a file info asset part.
Inherited Members
Namespace: Evergine.Framework.Assets.AssetParts
Assembly: Evergine.Framework.dll
Syntax
public class FileInfoPart : AssetPart
Constructors
FileInfoPart()
Initializes a new instance of the File
Declaration
public FileInfoPart()
FileInfoPart(string, byte[])
Initializes a new instance of the File
Declaration
public FileInfoPart(string filename, byte[] data)
Parameters
Fields
FileData
The file data byte array. You must use the property File
Declaration
public byte[] FileData
Field Value
Type | Description |
---|---|
byte[] |
FileDataSize
Gets the file data size.
Declaration
public int FileDataSize
Field Value
Type | Description |
---|---|
int |
FileName
The Filename.
Declaration
public string FileName
Field Value
Type | Description |
---|---|
string |
Properties
AsText
Gets the file data as text string.
Declaration
public string AsText { get; }
Property Value
Type | Description |
---|---|
string |
Methods
Free()
Release the resources used by this instance.
Declaration
public void Free()
Read(BinaryReader)
Read the file info part.
Declaration
public static FileInfoPart Read(BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
Binary |
reader | The binary reader. |
Returns
Type | Description |
---|---|
File |
The File Info Part. |
ReadAsync(string, FileStream)
Read the file info part from a file stream asynchronously.
Declaration
public static Task<FileInfoPart> ReadAsync(string name, FileStream fileStream)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name. |
File |
fileStream | The file stream. |
Returns
Type | Description |
---|---|
Task<File |
The File Info Part asynchronous task. |
Write(BinaryWriter)
Writes the sub asset.
Declaration
public override void Write(BinaryWriter writer)
Parameters
Type | Name | Description |
---|---|---|
Binary |
writer | The stream. |