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 FileInfoPart class.
Declaration
public FileInfoPart()
  FileInfoPart(string, byte[])
Initializes a new instance of the FileInfoPart class.
Declaration
public FileInfoPart(string filename, byte[] data)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | filename | The filename.  | 
      
| byte[] | data | The file data.  | 
      
Fields
FileData
The file data byte array. You must use the property FileDataSize to read the array.
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 | 
|---|---|---|
| BinaryReader | reader | The binary reader.  | 
      
Returns
| Type | Description | 
|---|---|
| FileInfoPart | 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.  | 
      
| FileStream | fileStream | The file stream.  | 
      
Returns
| Type | Description | 
|---|---|
| Task<FileInfoPart> | The File Info Part asynchronous task.  | 
      
Write(BinaryWriter)
Writes the sub asset.
Declaration
public override void Write(BinaryWriter writer)
  Parameters
| Type | Name | Description | 
|---|---|---|
| BinaryWriter | writer | The stream.  |