withFile

fun withFile(path: String, data: ByteArray): NdsRom

Returns a new NdsRom with the filesystem file at path replaced by data. If path does not exist in the original ROM this call has no effect on the packed output. The original instance is unchanged.

Return

A copy of this ROM with the updated file.

Parameters

path

Virtual filesystem path of the file to replace (e.g. "a/0/3/2").

data

New file contents.