chromium/native_client_sdk/doc_generated/pepper_dev/cpp/classpp_1_1_file_system.html

{{+bindTo:partials.standard_nacl_api}}
<h1>pp::FileSystem Class Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
  <div>
<!-- Generated by Doxygen 1.7.6.1 -->



</div>
<!--header-->
<div class="contents">
<!-- doxytag: class="pp::FileSystem" --><!-- doxytag: inherits="pp::Resource" --><div class="dynheader">
Inheritance diagram for pp::FileSystem:</div>
<div class="dyncontent">
<div class="center"><img src="classpp_1_1_file_system__inherit__graph.png" border="0" usemap="#pp_1_1_file_system_inherit__map" alt="Inheritance graph" /></div>
<map name="pp_1_1_file_system_inherit__map" id="pp_1_1_file_system_inherit__map">
<area shape="rect" id="node2" href="classpp_1_1_resource.html" title="A reference counted module resource." alt="" coords="11,5,115,32"></area></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="classpp_1_1_file_system-members.html">List of all members.</a></p>
<h2>
Public Member Functions</h2><table class="memberdecls">

<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_file_system.html#aaa3cca58df52c4a3c4daaf0e615a1168">FileSystem</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_file_system.html#a4d56e93917775b192558b55fe682acfd">FileSystem</a> (const <a class="el" href="classpp_1_1_file_system.html">FileSystem</a> &amp;other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_file_system.html#a33ddc6114cd25d48727c300dccc8754d">FileSystem</a> (const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_file_system.html#af97b2860b7e99d2283cf556b4ca78c48">FileSystem</a> (<a class="el" href="namespacepp.html#a339083c1beec620267bf8b3c55decaa5">PassRef</a>, PP_Resource resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_file_system.html#a8e73239f076ec5897d49b2bf530fdfdc">FileSystem</a> (const <a class="el" href="classpp_1_1_instance_handle.html">InstanceHandle</a> &amp;instance, PP_FileSystemType type)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_file_system.html#ae1ca78fc88c2e2a507e9ab71d9352d54">Open</a> (int64_t expected_size, const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;cc)</td></tr>
</table><h2>
Static Public Member Functions</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_file_system.html#ae48a32b67e78b1e2125270ec68fab29d">IsFileSystem</a> (const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;resource)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <code><a class="el" href="classpp_1_1_file_system.html" title="The FileSystem class identifies the file system type associated with a file.">FileSystem</a></code> class identifies the file system type associated with a file. </p>
</div><hr /><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aaa3cca58df52c4a3c4daaf0e615a1168"></a><!-- doxytag: member="pp::FileSystem::FileSystem" ref="aaa3cca58df52c4a3c4daaf0e615a1168" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_file_system.html#aaa3cca58df52c4a3c4daaf0e615a1168">pp::FileSystem::FileSystem</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Constructs an <a class="el" href="classpp_1_1_resource.html#a859068e34cdc2dc0b78754c255323aa9" title="This functions determines if this resource is invalid or uninitialized.">is_null()</a> filesystem resource. </p>
<p>If you use this constructor, you will have to assign it to a "real" <a class="el" href="classpp_1_1_file_system.html" title="The FileSystem class identifies the file system type associated with a file.">FileSystem</a> object before you can use it. </p>
</div>
</div>
<a class="anchor" id="a4d56e93917775b192558b55fe682acfd"></a><!-- doxytag: member="pp::FileSystem::FileSystem" ref="a4d56e93917775b192558b55fe682acfd" args="(const FileSystem &amp;other)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_file_system.html#aaa3cca58df52c4a3c4daaf0e615a1168">pp::FileSystem::FileSystem</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_file_system.html">FileSystem</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The copy constructor for <code><a class="el" href="classpp_1_1_file_system.html" title="The FileSystem class identifies the file system type associated with a file.">FileSystem</a></code>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A reference to a <code><a class="el" href="classpp_1_1_file_system.html" title="The FileSystem class identifies the file system type associated with a file.">FileSystem</a></code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a33ddc6114cd25d48727c300dccc8754d"></a><!-- doxytag: member="pp::FileSystem::FileSystem" ref="a33ddc6114cd25d48727c300dccc8754d" args="(const Resource &amp;resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_file_system.html#aaa3cca58df52c4a3c4daaf0e615a1168">pp::FileSystem::FileSystem</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;&#160;</td>
<td class="paramname"><em>resource</em></td><td>)</td>
<td><code> [explicit]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Constructs a <code><a class="el" href="classpp_1_1_file_system.html" title="The FileSystem class identifies the file system type associated with a file.">FileSystem</a></code> from a <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code> containing a file system. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="af97b2860b7e99d2283cf556b4ca78c48"></a><!-- doxytag: member="pp::FileSystem::FileSystem" ref="af97b2860b7e99d2283cf556b4ca78c48" args="(PassRef, PP_Resource resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_file_system.html#aaa3cca58df52c4a3c4daaf0e615a1168">pp::FileSystem::FileSystem</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespacepp.html#a339083c1beec620267bf8b3c55decaa5">PassRef</a>&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PP_Resource&#160;</td>
<td class="paramname"><em>resource</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor used when you have received a PP_Resource as a return value that has already been reference counted. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A PP_Resource corresponding to a PPB_FileSystem. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a8e73239f076ec5897d49b2bf530fdfdc"></a><!-- doxytag: member="pp::FileSystem::FileSystem" ref="a8e73239f076ec5897d49b2bf530fdfdc" args="(const InstanceHandle &amp;instance, PP_FileSystemType type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_file_system.html#aaa3cca58df52c4a3c4daaf0e615a1168">pp::FileSystem::FileSystem</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_instance_handle.html">InstanceHandle</a> &amp;&#160;</td>
<td class="paramname"><em>instance</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PP_FileSystemType&#160;</td>
<td class="paramname"><em>type</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This constructor creates a file system object of the given type. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The instance with which this resource will be associated.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>A file system type as defined by <code>PP_FileSystemType</code> enum. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr /><h2>Member Function Documentation</h2>
<a class="anchor" id="ae48a32b67e78b1e2125270ec68fab29d"></a><!-- doxytag: member="pp::FileSystem::IsFileSystem" ref="ae48a32b67e78b1e2125270ec68fab29d" args="(const Resource &amp;resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static bool <a class="el" href="classpp_1_1_file_system.html#ae48a32b67e78b1e2125270ec68fab29d">pp::FileSystem::IsFileSystem</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;&#160;</td>
<td class="paramname"><em>resource</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Checks whether a <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code> is a file system, to test whether it is appropriate for use with the <code><a class="el" href="classpp_1_1_file_system.html" title="The FileSystem class identifies the file system type associated with a file.">FileSystem</a></code> constructor. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code> to test.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if <code>resource</code> is a file system. </dd></dl>
</div>
</div>
<a class="anchor" id="ae1ca78fc88c2e2a507e9ab71d9352d54"></a><!-- doxytag: member="pp::FileSystem::Open" ref="ae1ca78fc88c2e2a507e9ab71d9352d54" args="(int64_t expected_size, const CompletionCallback &amp;cc)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_file_system.html#ae1ca78fc88c2e2a507e9ab71d9352d54">pp::FileSystem::Open</a> </td>
<td>(</td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>expected_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;&#160;</td>
<td class="paramname"><em>cc</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_file_system.html#ae1ca78fc88c2e2a507e9ab71d9352d54" title="Open() opens the file system.">Open()</a> opens the file system. </p>
<p>A file system must be opened before running any other operation on it.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">expected_size</td><td>The expected size of the file system. Note that this does not request quota; to do that, you must either invoke requestQuota from JavaScript: <a href="http://www.html5rocks.com/en/tutorials/file/filesystem/#toc-requesting-quota">http://www.html5rocks.com/en/tutorials/file/filesystem/#toc-requesting-quota</a> or set the unlimitedStorage permission for Chrome Web Store apps: <a href="http://code.google.com/chrome/extensions/manifest.html#permissions">http://code.google.com/chrome/extensions/manifest.html#permissions</a></td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">cc</td><td>A <code>PP_CompletionCallback</code> to be called upon completion of <a class="el" href="classpp_1_1_file_system.html#ae1ca78fc88c2e2a507e9ab71d9352d54" title="Open() opens the file system.">Open()</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code>pp_errors.h</code>. </dd></dl>
</div>
</div>
<hr />The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="file__system_8h.html">file_system.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}