1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>FS_LoadArchive</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">FS_LoadArchive <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <nitro/fs.h></CODE><BR> <BR> <CODE>BOOL FS_LoadArchive(<A href="../fs_archive_type.html">FSArchive</a> *p_arc,<BR> u32 base, u32 fat, u32 fat_size, u32 fnt, u32 fnt_size,<BR> <A href="../fs_archive_rw_func_type.html">FS_ARCHIVE_READ_FUNC</a> read_func,<BR> <A href="../fs_archive_rw_func_type.html">FS_ARCHIVE_WRITE_FUNC</a> write_func);</CODE><br> <br> 20 </dd> 21</dl> 22 23<h2>Arguments</h2> 24<TABLE border="1" width="100%"> 25 <TBODY> 26 <TR> 27<TD width="13%"><CODE>p_arc</CODE></TD> 28<TD width="87%">Address of the <A href="../fs_archive_type.html"><code>FSArchive</code></a> structure.</TD> 29 </TR> 30 <TR> 31<TD width="13%"><CODE>base</CODE></TD> 32<TD width="87%">The base offset value to the archive-inherent address space. This value is retrieved by the <code><a href="FS_GetArchiveBase.html">FS_GetArchiveBase</a></code> function to make archive implementation easier.</TD> 33 </TR> 34 <TR> 35<TD width="13%"><code>fat</code></TD> 36<TD width="87%">FAT starting-position offset to the archive-inherent address space.</TD> 37 </TR> 38 <TR> 39<TD width="13%"><code>fat_size</code></TD> 40<TD width="87%">The archive's FAT size in bytes.</TD> 41 </TR> 42 <TR> 43<TD width="13%"><code>fnt</code></TD> 44<TD width="87%">FNT starting-position offset to the archive-inherent address space.</TD> 45 </TR> 46 <TR> 47<TD width="13%"><code>fnt_size</code></TD> 48<TD width="87%">The archive's FNT size in bytes.</TD> 49 </TR> 50 <TR> 51<TD width="13%"><code>read_func</code></TD> 52<TD width="87%">Callback function with read access to the archive-specific address space. This function is called from within FS functions that use the archive command internally.</TD> 53 </TR> 54 <TR> 55<TD width="13%"><code>write_func</code></TD> 56<TD width="87%">Callback function with write access to the archive-specific address space. This function is called from within FS functions that use the archive command internally.</TD> 57 </TR> 58 </TBODY> 59</TABLE> 60 61<h2>Return Values</h2> 62<p><code>TRUE</code> if the archive is correctly loaded in the file system. <code>FALSE</code> otherwise.</p> 63 64<H2>Description</H2> 65<P>Loads the archive to the file system based on the specified implementation. The archive name must have already been registered by the <code><a href="FS_RegisterArchiveName.html">FS_RegisterArchiveName</a></code> function. Based on the given combination of arguments, the file system assumes the archive will behave as follows:<BR> The archive has a unique data structure with linear memory that can only be accessed by <code>read_func</code> and <code>write_func</code>. The archive has a region of <code>fat_size</code> bytes starting from the position of <code>fat</code> where FAT information conforming to the TwlROM format is stored, and the data in this region can be accessed by <code>read_func</code>. The archive has a region of <code>fnt_size</code> bytes starting from the position of <code>fnt</code> where FNT information conforming to the TwlROM format is stored, and the data in this region can be accessed by <code>read_func</code>. The archive has file data in the entire region domain specified by the FAT information, and this can be accessed by <code>read_func</code>. Once this function ends successfully, a callback in the file system accesses the archive. A loaded archive can be unloaded with the <code><a href="FS_UnloadArchive.html">FS_UnloadArchive</a></code> function. The archive takes the valid state in the file system when this function ends successfully, unless it was explicitly suspended by the <code><a href="FS_SuspendArchive.html">FS_SuspendArchive</a></code> function before running the <code>FS_LoadArchive</code> function. <BR> 66<h2>See Also</h2> 67<p><CODE><A href="../fs_archive_type.html">FSArchive</A><BR><A href="../fs_archive_name_len_max_const.html">FS_ARCHIVE_NAME_LEN_MAX</A> <BR> <A href="FS_ReleaseArchiveName.html">FS_ReleaseArchiveName</A><BR><A href="FS_UnloadArchive.html">FS_UnloadArchive</A></CODE></P> 68<H2>Revision History</H2> 69<P> 702005/06/01 Added statement about callback being called from within the FS function.<br>2004/11/02 Corrected links.<br>2004/06/30 Initial version. 71</P> 72<hr><p>CONFIDENTIAL</p></body> 73</html> 74