Models structural NitroFS changes before ROM offsets and file identifiers are assigned. More...
Public Member Functions | |
| async ValueTask< NdsDirectoryImportResult > | ImportDirectoryAsync (string sourceDirectory, string destinationDirectory="/", NdsDirectoryImportOptions? options=null, CancellationToken cancellationToken=default) |
| Stages and transactionally merges a host directory into this NitroFS recipe. Calling the method repeatedly provides ordered multi-root composition under an explicit file-collision policy; a failed stage changes nothing. | |
| NdsBuildFile | GetFile (string path) |
| Resolves a builder-owned payload so other recipe components can retain its identity across path moves. | |
| NdsFileSystemBuilder | CreateDirectory (string path) |
| Declares a directory, retaining it even when no descendant files are added. | |
| NdsFileSystemBuilder | AddFile (string path, ReadOnlySpan< byte > contents) |
| Adds a payload that must not already exist, creating its parent directories as needed. | |
| NdsFileSystemBuilder | SetFile (string path, ReadOnlySpan< byte > contents) |
| Defines the payload at a path, replacing an existing file while preserving directory validity. | |
| NdsFileSystemBuilder | RemoveFile (string path) |
| Removes a payload while leaving its parent directories available for later files or empty output. | |
| NdsFileSystemBuilder | MoveFile (string sourcePath, string destinationPath) |
| Changes a file's NitroFS identity without copying or transforming its payload. | |
| NdsFileSystemBuilder | MoveDirectory (string sourcePath, string destinationPath) |
| Re-roots an entire directory subtree while preserving every payload byte and relative child path. | |
| NdsFileSystemBuilder | RemoveDirectory (string path) |
| Omits an explicitly declared directory after proving that no descendants would become orphaned. | |
Properties | |
| IReadOnlyCollection< string > | Directories [get] |
| Provides a stable view of every directory that will appear in the FNT, including empty ones. | |
| IReadOnlyCollection< NdsBuildFile > | Files [get] |
| Provides a path-sorted snapshot of payloads currently destined for the image. | |
Models structural NitroFS changes before ROM offsets and file identifiers are assigned.
NitroFS stores names in a directory table but stores payload locations in a separate FAT. This builder deliberately works in paths and bytes so callers can add, remove, move, or rename entries without managing either binary table. BuildSnapshot assigns identifiers in a stable, ordinal order, making repeated builds from the same logical tree reproducible.
Definition at line 13 of file NdsFileSystemBuilder.cs.
|
inline |
Adds a payload that must not already exist, creating its parent directories as needed.
| path | An absolute or root-relative path whose segments must map one-to-one to FNT bytes. |
| contents | Exact uncompressed payload bytes. They are copied before this method returns and may therefore come from stack memory, pooled storage, or a mutable caller buffer. |
| IOException | The path is occupied or a parent component is a file. |
Definition at line 108 of file NdsFileSystemBuilder.cs.
|
inline |
Declares a directory, retaining it even when no descendant files are added.
| path | An absolute or root-relative NitroFS path. Separators are normalized to /; each segment must be 1-127 eight-bit characters and may not be . or ... |
| IOException | A file occupies the directory or one of its parent paths. |
Definition at line 90 of file NdsFileSystemBuilder.cs.
|
inline |
Resolves a builder-owned payload so other recipe components can retain its identity across path moves.
| path | Canonical or root-relative NitroFS file path. |
| FileNotFoundException | No file exists at the normalized path. |
Definition at line 73 of file NdsFileSystemBuilder.cs.
|
inline |
Stages and transactionally merges a host directory into this NitroFS recipe. Calling the method repeatedly provides ordered multi-root composition under an explicit file-collision policy; a failed stage changes nothing.
| sourceDirectory | Existing host root read without following links implicitly. |
| destinationDirectory | NitroFS directory receiving the source root's contents, commonly /. |
| options | Optional link, collision, file-count, and total-byte policy. |
| cancellationToken | Cancels host enumeration and file reads before application begins. |
Definition at line 51 of file NdsFileSystemBuilder.cs.
|
inline |
Re-roots an entire directory subtree while preserving every payload byte and relative child path.
| sourcePath | An existing directory other than the immutable NitroFS root. |
| destinationPath | A free path outside the source subtree. |
| DirectoryNotFoundException | The source directory does not exist. |
| IOException | The move would create a cycle or collide with an existing entry. |
Definition at line 201 of file NdsFileSystemBuilder.cs.
|
inline |
Changes a file's NitroFS identity without copying or transforming its payload.
| sourcePath | The absolute or root-relative path of the existing payload. |
| destinationPath | A free destination whose parent chain contains only directories. |
| FileNotFoundException | The source does not identify a file. |
| IOException | The destination or one of its parent paths is occupied incompatibly. |
Definition at line 170 of file NdsFileSystemBuilder.cs.
|
inline |
Omits an explicitly declared directory after proving that no descendants would become orphaned.
| path | An existing non-root directory path. |
| DirectoryNotFoundException | The normalized path is not a directory. |
| IOException | The directory still contains a file or child directory. |
Definition at line 258 of file NdsFileSystemBuilder.cs.
|
inline |
Removes a payload while leaving its parent directories available for later files or empty output.
| path | The absolute or root-relative path of the existing file. |
| FileNotFoundException | No file exists at the normalized path. |
Definition at line 151 of file NdsFileSystemBuilder.cs.
|
inline |
Defines the payload at a path, replacing an existing file while preserving directory validity.
| path | An absolute or root-relative path whose segments must map one-to-one to FNT bytes. |
| contents | Exact uncompressed bytes, copied immediately into builder-owned memory. |
| IOException | The path names a directory or a parent component is a file. |
Definition at line 130 of file NdsFileSystemBuilder.cs.
|
get |
Provides a stable view of every directory that will appear in the FNT, including empty ones.
The root is represented as /; all other values are absolute NitroFS paths.
Definition at line 30 of file NdsFileSystemBuilder.cs.
|
get |
Provides a path-sorted snapshot of payloads currently destined for the image.
Enumeration order is useful for deterministic tooling but is not the final FAT identifier order; NitroFS requires files to be grouped by their parent directory during serialization.
Definition at line 39 of file NdsFileSystemBuilder.cs.