NdsForge.NET 1.0.1
Read, validate, edit, compare, and build Nintendo DS and DSi images from .NET
Loading...
Searching...
No Matches
NdsForge.NdsFile Class Referencesealed

Connects a byte-preserving FNT path and stable FAT identifier to lazily read cartridge bytes. More...

Public Member Functions

Stream OpenRead ()
 Opens a bounded, seekable stream over the file contents.
async ValueTask CopyToAsync (Stream destination, CancellationToken cancellationToken=default)
 Streams this allocation into a caller-owned destination without buffering the complete file in memory.
async ValueTask< byte[]> ReadAllBytesAsync (CancellationToken cancellationToken=default)
 Reads all file contents into memory.

Properties

int Id [get]
 Indexes the FAT allocation and is also the identifier referenced by overlay table entries.
string Name [get]
 Projects each case-sensitive FNT name byte directly to the same-valued Unicode code point. Conventional ASCII remains readable, while values 0x80-0xFF can be recovered losslessly with Latin-1 encoding.
string FullPath [get]
 Identifies the entry with ordinal, slash-delimited semantics such as /data/maps/map.bin.
NdsRegion Data [get]
 Locates the uncompressed payload through the FAT's half-open start/end offsets.
NdsDirectory Parent [get]
 Links back to the directory that assigned this file's name and starting file ID.

Detailed Description

Connects a byte-preserving FNT path and stable FAT identifier to lazily read cartridge bytes.

Definition at line 4 of file NdsFile.cs.

Member Function Documentation

◆ CopyToAsync()

async ValueTask NdsForge.NdsFile.CopyToAsync ( Stream destination,
CancellationToken cancellationToken = default )
inline

Streams this allocation into a caller-owned destination without buffering the complete file in memory.

Parameters
destinationWritable stream positioned where the first payload byte should be copied.
cancellationTokenCancels reads and writes while leaving the destination open.
Returns
A task-like value that completes after the bounded allocation has been copied.

Definition at line 58 of file NdsFile.cs.

◆ OpenRead()

Stream NdsForge.NdsFile.OpenRead ( )
inline

Opens a bounded, seekable stream over the file contents.

Returns
A read-only stream.

Definition at line 52 of file NdsFile.cs.

◆ ReadAllBytesAsync()

async ValueTask< byte[]> NdsForge.NdsFile.ReadAllBytesAsync ( CancellationToken cancellationToken = default)
inline

Reads all file contents into memory.

Parameters
cancellationTokenA token used to cancel reading.
Returns
The complete file contents.

Definition at line 73 of file NdsFile.cs.

Property Documentation

◆ Data

NdsRegion NdsForge.NdsFile.Data
get

Locates the uncompressed payload through the FAT's half-open start/end offsets.

Definition at line 45 of file NdsFile.cs.

◆ FullPath

string NdsForge.NdsFile.FullPath
get

Identifies the entry with ordinal, slash-delimited semantics such as /data/maps/map.bin.

Definition at line 42 of file NdsFile.cs.

◆ Id

int NdsForge.NdsFile.Id
get

Indexes the FAT allocation and is also the identifier referenced by overlay table entries.

Definition at line 33 of file NdsFile.cs.

◆ Name

string NdsForge.NdsFile.Name
get

Projects each case-sensitive FNT name byte directly to the same-valued Unicode code point. Conventional ASCII remains readable, while values 0x80-0xFF can be recovered losslessly with Latin-1 encoding.

Definition at line 39 of file NdsFile.cs.

◆ Parent

NdsDirectory NdsForge.NdsFile.Parent
get

Links back to the directory that assigned this file's name and starting file ID.

Definition at line 48 of file NdsFile.cs.


The documentation for this class was generated from the following file: