nn::fs::MountRom Function

Syntax

Result MountRom(
     const char * archiveName,
     size_t maxFile,
     size_t maxDirectory,
     void * workingMemory,
     size_t workingMemorySize,
     bool useCache = true
);

Arguments

Name Description
in archiveName Specifies the name of the archive. (In the overloaded version of this function in which this argument is omitted, "rom:" is specified implicitly.)
in maxFile The maximum number of files that can be opened simultaneously.
in maxDirectory The maximum number of directories that can be opened simultaneously.
in workingMemory The starting address of the memory region used for ROM archive operations.
in workingMemorySize The size of the memory region used for ROM archive operations.
in useCache Set to true to enable caching of metadata to memory, or false to disable metadata caching.

Return Values

Returns the result of the operation.

Description

Mounts a ROM archive.

This function mounts a ROM archive that accesses a ROMFS generated at build time. The numbers of files and directories you can simultaneously open from the ROM archive are specified by maxFile and maxDirectory, respectively. The memory passed in to workingMemory must be at least as large as the required memory size calculated by the GetRomRequiredMemorySize function. You can cache ROMFS metadata to memory by setting the useCache argument to true. Doing so will reduce the time required to open files and scan directories, at the expense of increased memory requirements.

This function mounts a ROM archive that accesses a ROMFS generated at build time. The numbers of files and directories you can simultaneously open from the ROM archive are specified by maxFile and maxDirectory, respectively. The memory passed in to workingMemory must be at least as large as the required memory size calculated by the GetRomRequiredMemorySize function. You can cache ROMFS metadata to memory by setting the useCache argument to true. Doing so will reduce the time required to open files and scan directories, at the expense of increased memory requirements.

Revision History

2010/09/10
Initial version.

CONFIDENTIAL