#include <nitro/fs.h>
u32 FS_LoadArchiveTables(
FSArchive *p_arc,
void *p_mem,
u32 max_size);
Loads the archive's FAT and FNT information table data into previously-obtained memory.
Doing this boosts the access efficiency of commands that involve directory operations.
The data is loaded into memory as long as the specified memory size is sufficient to hold the tables. Any subsequent file access uses this memory region, making it inaccessible for any other purpose.
If the specified memory size is not sufficient, then nothing is done. When this is the case, the specified memory is returned to the available memory pool without being used.
This function always returns the number of bytes that are required to load the tables. The judgment is based on whether the returned value is larger than max_size or equal to or smaller than max_size.
p_arc |
Address of the FSArchive structure |
p_mem |
Pointer to the memory the user has prepared for tables |
max_size |
The memory size in bytes |
The exact number of bytes needed to load the tables.
11/02/2004 Made argument names consistent.
06/30/2004 Initial version.