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

Provides tree, path, and file-ID access to an image's NitroFS. More...

Public Member Functions

NdsFile GetFile (string path)
 Resolves a case-sensitive logical path without applying host-filesystem normalization.
bool TryGetFile (string path, [NotNullWhen(true)] out NdsFile? file)
 Attempts to find a named file by canonical or root-relative path.
NdsDirectory GetDirectory (string path)
 Resolves the root or a nested directory by its case-sensitive logical path.
bool TryGetDirectory (string path, [NotNullWhen(true)] out NdsDirectory? directory)
 Attempts direct directory lookup without conflating an absent path with an empty directory.
NdsFile GetFile (int fileId)
 Resolves a FAT identifier only when the FNT assigns that allocation a visible name.

Properties

NdsDirectory Root [get]
 Anchors hierarchical traversal at directory ID 0xF000 and canonical path /.
IReadOnlyList< NdsDirectoryDirectories [get]
 Gets all reachable directories in directory-ID order.
IReadOnlyList< NdsFileFiles [get]
 Gets all named files in file-ID order.
IReadOnlyList< NdsFileAllocation > Allocations [get]
 Gets every FAT allocation, including unnamed overlay payloads.

Detailed Description

Provides tree, path, and file-ID access to an image's NitroFS.

Definition at line 6 of file NdsFileSystem.cs.

Member Function Documentation

◆ GetDirectory()

NdsDirectory NdsForge.NdsFileSystem.GetDirectory ( string path)
inline

Resolves the root or a nested directory by its case-sensitive logical path.

Parameters
pathCanonical or root-relative NitroFS directory path; / selects the root.
Returns
The directory node retaining its encoded ID and child order.

Definition at line 68 of file NdsFileSystem.cs.

◆ GetFile() [1/2]

NdsFile NdsForge.NdsFileSystem.GetFile ( int fileId)
inline

Resolves a FAT identifier only when the FNT assigns that allocation a visible name.

Parameters
fileIdThe file ID.
Returns
The named file.

Definition at line 86 of file NdsFileSystem.cs.

◆ GetFile() [2/2]

NdsFile NdsForge.NdsFileSystem.GetFile ( string path)
inline

Resolves a case-sensitive logical path without applying host-filesystem normalization.

Parameters
pathThe NitroFS path.
Returns
The named file.

Definition at line 50 of file NdsFileSystem.cs.

◆ TryGetDirectory()

bool NdsForge.NdsFileSystem.TryGetDirectory ( string path,
[NotNullWhen(true)] out NdsDirectory? directory )
inline

Attempts direct directory lookup without conflating an absent path with an empty directory.

Parameters
pathCanonical or root-relative NitroFS directory path.
directoryReceives the immutable directory node when it exists.
Returns
true when the FNT contains the normalized directory.

Definition at line 80 of file NdsFileSystem.cs.

◆ TryGetFile()

bool NdsForge.NdsFileSystem.TryGetFile ( string path,
[NotNullWhen(true)] out NdsFile? file )
inline

Attempts to find a named file by canonical or root-relative path.

Parameters
pathThe NitroFS path.
fileReceives the named file when found.
Returns
true when the file exists.

Definition at line 62 of file NdsFileSystem.cs.

Property Documentation

◆ Allocations

IReadOnlyList<NdsFileAllocation> NdsForge.NdsFileSystem.Allocations
get

Gets every FAT allocation, including unnamed overlay payloads.

Definition at line 45 of file NdsFileSystem.cs.

◆ Directories

IReadOnlyList<NdsDirectory> NdsForge.NdsFileSystem.Directories
get

Gets all reachable directories in directory-ID order.

Definition at line 39 of file NdsFileSystem.cs.

◆ Files

IReadOnlyList<NdsFile> NdsForge.NdsFileSystem.Files
get

Gets all named files in file-ID order.

Definition at line 42 of file NdsFileSystem.cs.

◆ Root

NdsDirectory NdsForge.NdsFileSystem.Root
get

Anchors hierarchical traversal at directory ID 0xF000 and canonical path /.

Definition at line 36 of file NdsFileSystem.cs.


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