248 lines
10 KiB
HTML
248 lines
10 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
<title>JGE++: JFileSystem Class Reference</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.5.3 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<h1>JFileSystem Class Reference</h1><!-- doxytag: class="JFileSystem" --><code>#include <JFileSystem.h></code>
|
|
<p>
|
|
<div class="dynheader">
|
|
Collaboration diagram for JFileSystem:</div>
|
|
<div class="dynsection">
|
|
</div>
|
|
|
|
<p>
|
|
<a href="class_j_file_system-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_file_system.html#0fac4ba24149963e340f0a8a0feff476">AttachZipFile</a> (const string &zipfile, char *password=NULL)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_file_system.html#37180162381e14745219db5072db52f7">DetachZipFile</a> ()</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_file_system.html#c88dc39af52d897425d6463ab440ceec">OpenFile</a> (const string &filename)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_file_system.html#147e8194558a0bf04b08b2f6d51ad4db">ReadFile</a> (void *buffer, int size)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_file_system.html#ca6bff74d6c7983f84998827f25b0eba">GetFileSize</a> ()</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_file_system.html#6977c5c3dde22da9f7170251238fb6b6">CloseFile</a> ()</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_file_system.html#452193b25d89103976b3acc8d10b473f">SetResourceRoot</a> (const string &resourceRoot)</td></tr>
|
|
|
|
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="class_j_file_system.html">JFileSystem</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_file_system.html#0275cfa78c3323b35375d3b3f2b354b8">GetInstance</a> ()</td></tr>
|
|
|
|
</table>
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
Interface for low level file access with ZIP archive support. All file operations in <a class="el" href="class_j_g_e.html">JGE</a> are handled through this class so if a ZIP archive is attached, all the resources will be loaded from the archive file. <hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="0275cfa78c3323b35375d3b3f2b354b8"></a><!-- doxytag: member="JFileSystem::GetInstance" ref="0275cfa78c3323b35375d3b3f2b354b8" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static <a class="el" href="class_j_file_system.html">JFileSystem</a>* JFileSystem::GetInstance </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Get the singleton instance
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="0fac4ba24149963e340f0a8a0feff476"></a><!-- doxytag: member="JFileSystem::AttachZipFile" ref="0fac4ba24149963e340f0a8a0feff476" args="(const string &zipfile, char *password=NULL)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool JFileSystem::AttachZipFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const string & </td>
|
|
<td class="paramname"> <em>zipfile</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char * </td>
|
|
<td class="paramname"> <em>password</em> = <code>NULL</code></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Attach ZIP archive to the file system.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>zipfile</em> </td><td>- Name of ZIP archive. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>password</em> </td><td>- Password for the ZIP archive. Default is NULL.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Status of the attach operation. </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="37180162381e14745219db5072db52f7"></a><!-- doxytag: member="JFileSystem::DetachZipFile" ref="37180162381e14745219db5072db52f7" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void JFileSystem::DetachZipFile </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Release the attached ZIP archive.
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="c88dc39af52d897425d6463ab440ceec"></a><!-- doxytag: member="JFileSystem::OpenFile" ref="c88dc39af52d897425d6463ab440ceec" args="(const string &filename)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool JFileSystem::OpenFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const string & </td>
|
|
<td class="paramname"> <em>filename</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Open file for reading.
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="147e8194558a0bf04b08b2f6d51ad4db"></a><!-- doxytag: member="JFileSystem::ReadFile" ref="147e8194558a0bf04b08b2f6d51ad4db" args="(void *buffer, int size)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int JFileSystem::ReadFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"> <em>buffer</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>size</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Read data from file.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>- Buffer for reading. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>- Number of bytes to read.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes read. </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="ca6bff74d6c7983f84998827f25b0eba"></a><!-- doxytag: member="JFileSystem::GetFileSize" ref="ca6bff74d6c7983f84998827f25b0eba" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int JFileSystem::GetFileSize </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Get size of file.
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="6977c5c3dde22da9f7170251238fb6b6"></a><!-- doxytag: member="JFileSystem::CloseFile" ref="6977c5c3dde22da9f7170251238fb6b6" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void JFileSystem::CloseFile </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Close file.
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="452193b25d89103976b3acc8d10b473f"></a><!-- doxytag: member="JFileSystem::SetResourceRoot" ref="452193b25d89103976b3acc8d10b473f" args="(const string &resourceRoot)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void JFileSystem::SetResourceRoot </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const string & </td>
|
|
<td class="paramname"> <em>resourceRoot</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Set root for all the following file operations<p>
|
|
- New root.
|
|
</div>
|
|
</div><p>
|
|
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Oct 22 00:28:22 2007 for JGE++ by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
|
|
</body>
|
|
</html>
|