#include <nitro/fs.h>
BOOL FS_LoadArchive(
FSArchive *p_arc,
u32 base,
u32 fat,
u32 fat_size,
u32 fnt,
u32 fnt_size,
FS_ARCHIVE_READ_FUNC read_func,
FS_ARCHIVE_WRITE_FUNC write_func);
Loads the archive to the file system based on the specified implementation.
The archive name must have already been registered by the FS_RegisterArchiveName function.
Based on the given combination of arguments, the file system assumes the archive will behave as follows:
read_func and write_func.fat_size bytes starting from the position of fat where FAT information conforming to the NitroROM format is stored, and the data in this region can be accessed by read_func.fnt_size bytes starting from the position of fnt where FNT information conforming to the NitroROM format is stored, and the data in this region can be accessed by read_func.read_func.Once this function ends successfully, a callback in the file system accesses the archive.
A loaded archive can be unloaded with the FS_UnloadArchive function.
The archive takes the valid state in the file system when this function ends successfully as long as it has not explicitly suspended by FS_SuspendArchive before FS_LoadArchive runs.
p_arc |
Address of the FSArchive structure |
base |
The base offset value to the archive-inherent address space This value is obtained by the FS_GetArchiveBase function to make archive implementation easier. |
fat |
FAT starting-position offset to the archive-inherent address space |
fat_size |
The archive's FAT size in bytes |
fnt |
FNT starting-position offset to the archive-inherent address space |
fnt_size |
The archive's FNT size in bytes |
read_func |
The callback function for accessing archive-inherent address space for reading |
write_func |
The callback function for accessing archive-inherent address space for writing |
TRUE if the archive is correctly loaded in the file system. FALSE otherwise.
FSArchive,
FS_ARCHIVE_NAME_LEN_MAX,
FS_ReleaseArchiveName,
FS_UnloadArchive
11/02/2004 Corrected a link.
06/30/2004 Initial version.