1 {{+bindTo:partials.standard_nacl_article}}
2 <h1>pp::FileSystem Class Reference</h1>
4 <!-- Generated by Doxygen 1.7.6.1 -->
10 <div class="contents">
11 <!-- doxytag: class="pp::FileSystem" --><!-- doxytag: inherits="pp::Resource" --><div class="dynheader">
12 Inheritance diagram for pp::FileSystem:</div>
13 <div class="dyncontent">
14 <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>
15 <map name="pp_1_1_file_system_inherit__map" id="pp_1_1_file_system_inherit__map">
16 <area shape="rect" id="node2" href="classpp_1_1_resource.html" title="A reference counted module resource." alt="" coords="11,5,115,35"></area></map>
17 <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
18 <p><a href="classpp_1_1_file_system-members.html">List of all members.</a></p>
20 Public Member Functions</h2><table class="memberdecls">
22 <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_file_system.html#aaa3cca58df52c4a3c4daaf0e615a1168">FileSystem</a> ()</td></tr>
23 <tr><td class="memItemLeft" align="right" valign="top"> </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> &other)</td></tr>
24 <tr><td class="memItemLeft" align="right" valign="top"> </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> &resource)</td></tr>
25 <tr><td class="memItemLeft" align="right" valign="top"> </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>
26 <tr><td class="memItemLeft" align="right" valign="top"> </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> &instance, PP_FileSystemType type)</td></tr>
27 <tr><td class="memItemLeft" align="right" valign="top">int32_t </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> &cc)</td></tr>
29 Static Public Member Functions</h2><table class="memberdecls">
30 <tr><td class="memItemLeft" align="right" valign="top">static bool </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> &resource)</td></tr>
32 <hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
33 <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>
34 </div><hr /><h2>Constructor & Destructor Documentation</h2>
35 <a class="anchor" id="aaa3cca58df52c4a3c4daaf0e615a1168"></a><!-- doxytag: member="pp::FileSystem::FileSystem" ref="aaa3cca58df52c4a3c4daaf0e615a1168" args="()" -->
37 <div class="memproto">
38 <table class="memname">
40 <td class="memname"><a class="el" href="classpp_1_1_file_system.html#aaa3cca58df52c4a3c4daaf0e615a1168">pp::FileSystem::FileSystem</a> </td>
42 <td class="paramname"></td><td>)</td>
48 <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>
49 <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>
52 <a class="anchor" id="a4d56e93917775b192558b55fe682acfd"></a><!-- doxytag: member="pp::FileSystem::FileSystem" ref="a4d56e93917775b192558b55fe682acfd" args="(const FileSystem &other)" -->
54 <div class="memproto">
55 <table class="memname">
57 <td class="memname"><a class="el" href="classpp_1_1_file_system.html#aaa3cca58df52c4a3c4daaf0e615a1168">pp::FileSystem::FileSystem</a> </td>
59 <td class="paramtype">const <a class="el" href="classpp_1_1_file_system.html">FileSystem</a> & </td>
60 <td class="paramname"><em>other</em></td><td>)</td>
66 <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>
67 <dl class="params"><dt><b>Parameters:</b></dt><dd>
68 <table class="params">
69 <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>
75 <a class="anchor" id="a33ddc6114cd25d48727c300dccc8754d"></a><!-- doxytag: member="pp::FileSystem::FileSystem" ref="a33ddc6114cd25d48727c300dccc8754d" args="(const Resource &resource)" -->
77 <div class="memproto">
78 <table class="memname">
80 <td class="memname"><a class="el" href="classpp_1_1_file_system.html#aaa3cca58df52c4a3c4daaf0e615a1168">pp::FileSystem::FileSystem</a> </td>
82 <td class="paramtype">const <a class="el" href="classpp_1_1_resource.html">Resource</a> & </td>
83 <td class="paramname"><em>resource</em></td><td>)</td>
84 <td><code> [explicit]</code></td>
89 <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>
90 <dl class="params"><dt><b>Parameters:</b></dt><dd>
91 <table class="params">
92 <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>
98 <a class="anchor" id="af97b2860b7e99d2283cf556b4ca78c48"></a><!-- doxytag: member="pp::FileSystem::FileSystem" ref="af97b2860b7e99d2283cf556b4ca78c48" args="(PassRef, PP_Resource resource)" -->
100 <div class="memproto">
101 <table class="memname">
103 <td class="memname"><a class="el" href="classpp_1_1_file_system.html#aaa3cca58df52c4a3c4daaf0e615a1168">pp::FileSystem::FileSystem</a> </td>
105 <td class="paramtype"><a class="el" href="namespacepp.html#a339083c1beec620267bf8b3c55decaa5">PassRef</a> </td>
106 <td class="paramname">, </td>
109 <td class="paramkey"></td>
111 <td class="paramtype">PP_Resource </td>
112 <td class="paramname"><em>resource</em> </td>
122 <p>A constructor used when you have received a PP_Resource as a return value that has already been reference counted. </p>
123 <dl class="params"><dt><b>Parameters:</b></dt><dd>
124 <table class="params">
125 <tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A PP_Resource corresponding to a PPB_FileSystem. </td></tr>
131 <a class="anchor" id="a8e73239f076ec5897d49b2bf530fdfdc"></a><!-- doxytag: member="pp::FileSystem::FileSystem" ref="a8e73239f076ec5897d49b2bf530fdfdc" args="(const InstanceHandle &instance, PP_FileSystemType type)" -->
132 <div class="memitem">
133 <div class="memproto">
134 <table class="memname">
136 <td class="memname"><a class="el" href="classpp_1_1_file_system.html#aaa3cca58df52c4a3c4daaf0e615a1168">pp::FileSystem::FileSystem</a> </td>
138 <td class="paramtype">const <a class="el" href="classpp_1_1_instance_handle.html">InstanceHandle</a> & </td>
139 <td class="paramname"><em>instance</em>, </td>
142 <td class="paramkey"></td>
144 <td class="paramtype">PP_FileSystemType </td>
145 <td class="paramname"><em>type</em> </td>
155 <p>This constructor creates a file system object of the given type. </p>
156 <dl class="params"><dt><b>Parameters:</b></dt><dd>
157 <table class="params">
158 <tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The instance with which this resource will be associated.</td></tr>
159 <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>
165 <hr /><h2>Member Function Documentation</h2>
166 <a class="anchor" id="ae48a32b67e78b1e2125270ec68fab29d"></a><!-- doxytag: member="pp::FileSystem::IsFileSystem" ref="ae48a32b67e78b1e2125270ec68fab29d" args="(const Resource &resource)" -->
167 <div class="memitem">
168 <div class="memproto">
169 <table class="memname">
171 <td class="memname">static bool <a class="el" href="classpp_1_1_file_system.html#ae48a32b67e78b1e2125270ec68fab29d">pp::FileSystem::IsFileSystem</a> </td>
173 <td class="paramtype">const <a class="el" href="classpp_1_1_resource.html">Resource</a> & </td>
174 <td class="paramname"><em>resource</em></td><td>)</td>
175 <td><code> [static]</code></td>
180 <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>
181 <dl class="params"><dt><b>Parameters:</b></dt><dd>
182 <table class="params">
183 <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>
187 <dl class="return"><dt><b>Returns:</b></dt><dd>True if <code>resource</code> is a file system. </dd></dl>
190 <a class="anchor" id="ae1ca78fc88c2e2a507e9ab71d9352d54"></a><!-- doxytag: member="pp::FileSystem::Open" ref="ae1ca78fc88c2e2a507e9ab71d9352d54" args="(int64_t expected_size, const CompletionCallback &cc)" -->
191 <div class="memitem">
192 <div class="memproto">
193 <table class="memname">
195 <td class="memname">int32_t <a class="el" href="classpp_1_1_file_system.html#ae1ca78fc88c2e2a507e9ab71d9352d54">pp::FileSystem::Open</a> </td>
197 <td class="paramtype">int64_t </td>
198 <td class="paramname"><em>expected_size</em>, </td>
201 <td class="paramkey"></td>
203 <td class="paramtype">const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> & </td>
204 <td class="paramname"><em>cc</em> </td>
214 <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>
215 <p>A file system must be opened before running any other operation on it.</p>
216 <dl class="params"><dt><b>Parameters:</b></dt><dd>
217 <table class="params">
218 <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>
219 <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>
223 <dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code>pp_errors.h</code>. </dd></dl>
226 <hr />The documentation for this class was generated from the following file:<ul>
227 <li><a class="el" href="file__system_8h.html">file_system.h</a></li>
229 </div><!-- contents -->
230 {{/partials.standard_nacl_article}}