chromium/native_client_sdk/doc_generated/pepper_stable/c/struct_p_p_b___file_ref__1__2.html

{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_FileRef Struct 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="PPB_FileRef" --><h2>
Data Fields</h2><table class="memberdecls">

<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_ref__1__2.html#a10924f2900841919002972972567df40">Create</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_system, const char *path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_ref__1__2.html#a53f053134366e9491aee0b88e08346c8">IsFileRef</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga87b353f2ec8935c9c3294daff612c145">PP_FileSystemType</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_ref__1__2.html#acf8cefbf96f2e8ec6b3acd7233dbcce4">GetFileSystemType</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_ref__1__2.html#ad58bd00ff6a93829b810e4bb4a2ba1af">GetName</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_ref__1__2.html#aafb00e9a6100b5a1490819606ed36451">GetPath</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_ref__1__2.html#af6cfee4cde7c6d96aec1fd49d3768113">GetParent</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_ref__1__2.html#a829f880110d9d0756552a7070a08ed33">MakeDirectory</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> directory_ref, int32_t make_directory_flags, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_ref__1__2.html#a7a83c853e8066a47eb7f222967ac4559">Touch</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref, <a class="el" href="group___typedefs.html#ga537b277d2116e42b6acfe9323d40e1a0">PP_Time</a> last_access_time, <a class="el" href="group___typedefs.html#ga537b277d2116e42b6acfe9323d40e1a0">PP_Time</a> last_modified_time, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_ref__1__2.html#afe27a664ce6b576ae754ed3122f83cae">Delete</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_ref__1__2.html#a5139b53dae2953f5e3ec18a3b4ad93fa">Rename</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> new_file_ref, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_ref__1__2.html#abc723bde3892c6e5d323497070a08a60">Query</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref, struct <a class="el" href="struct_p_p___file_info.html">PP_FileInfo</a> *info, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_ref__1__2.html#adf5ee82e600680aae53cd70e39e9a568">ReadDirectoryEntries</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref, struct <a class="el" href="struct_p_p___array_output.html">PP_ArrayOutput</a> output, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <code>PPB_FileRef</code> struct represents a "weak pointer" to a file in a file system. </p>
<p>This struct contains a <code>PP_FileSystemType</code> identifier and a file path string. </p>
</div><hr /><h2>Field Documentation</h2>
<a class="anchor" id="a10924f2900841919002972972567df40"></a><!-- doxytag: member="PPB_FileRef::Create" ref="a10924f2900841919002972972567df40" args=")(PP_Resource file_system, const char *path)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(* <a class="el" href="struct_p_p_b___file_ref__1__2.html#a10924f2900841919002972972567df40">PPB_FileRef::Create</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_system, const char *path)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___file_ref__1__2.html#a10924f2900841919002972972567df40" title="Create() creates a weak pointer to a file in the given file system.">Create()</a> creates a weak pointer to a file in the given file system. </p>
<p>File paths are POSIX style.</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>PP_Resource</code> corresponding to a file system. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path to the file. Must begin with a '/' character.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Resource</code> corresponding to a file reference if successful or 0 if the path is malformed. </dd></dl>
</div>
</div>
<a class="anchor" id="afe27a664ce6b576ae754ed3122f83cae"></a><!-- doxytag: member="PPB_FileRef::Delete" ref="afe27a664ce6b576ae754ed3122f83cae" args=")(PP_Resource file_ref, struct PP_CompletionCallback callback)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___file_ref__1__2.html#afe27a664ce6b576ae754ed3122f83cae">PPB_FileRef::Delete</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___file_ref__1__2.html#afe27a664ce6b576ae754ed3122f83cae" title="Delete() deletes a file or directory.">Delete()</a> deletes a file or directory. </p>
<p>If <code>file_ref</code> refers to a directory, then the directory must be empty. It is an error to delete a file or directory that is in use. It is not valid to delete a file in the external file system.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">file_ref</td><td>A <code>PP_Resource</code> corresponding to a file reference. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called upon completion of <a class="el" href="struct_p_p_b___file_ref__1__2.html#afe27a664ce6b576ae754ed3122f83cae" title="Delete() deletes a file or directory.">Delete()</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. </dd></dl>
</div>
</div>
<a class="anchor" id="acf8cefbf96f2e8ec6b3acd7233dbcce4"></a><!-- doxytag: member="PPB_FileRef::GetFileSystemType" ref="acf8cefbf96f2e8ec6b3acd7233dbcce4" args=")(PP_Resource file_ref)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga87b353f2ec8935c9c3294daff612c145">PP_FileSystemType</a>(* <a class="el" href="struct_p_p_b___file_ref__1__2.html#acf8cefbf96f2e8ec6b3acd7233dbcce4">PPB_FileRef::GetFileSystemType</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___file_ref__1__2.html#acf8cefbf96f2e8ec6b3acd7233dbcce4" title="GetFileSystemType() returns the type of the file system.">GetFileSystemType()</a> returns the type of the file system. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">file_ref</td><td>A <code>PP_Resource</code> corresponding to a file reference.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_FileSystemType</code> with the file system type if valid or <code>PP_FILESYSTEMTYPE_INVALID</code> if the provided resource is not a valid file reference. </dd></dl>
</div>
</div>
<a class="anchor" id="ad58bd00ff6a93829b810e4bb4a2ba1af"></a><!-- doxytag: member="PPB_FileRef::GetName" ref="ad58bd00ff6a93829b810e4bb4a2ba1af" args=")(PP_Resource file_ref)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(* <a class="el" href="struct_p_p_b___file_ref__1__2.html#ad58bd00ff6a93829b810e4bb4a2ba1af">PPB_FileRef::GetName</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref)<code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___file_ref__1__2.html#ad58bd00ff6a93829b810e4bb4a2ba1af" title="GetName() returns the name of the file.">GetName()</a> returns the name of the file. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">file_ref</td><td>A <code>PP_Resource</code> corresponding to a file reference.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code><a class="el" href="struct_p_p___var.html" title="The PP_VAR struct is a variant data type and can contain any value of one of the types named in the P...">PP_Var</a></code> containing the name of the file. The value returned by this function does not include any path components (such as the name of the parent directory, for example). It is just the name of the file. Use <a class="el" href="struct_p_p_b___file_ref__1__2.html#aafb00e9a6100b5a1490819606ed36451" title="GetPath() returns the absolute path of the file.">GetPath()</a> to get the full file path. </dd></dl>
</div>
</div>
<a class="anchor" id="af6cfee4cde7c6d96aec1fd49d3768113"></a><!-- doxytag: member="PPB_FileRef::GetParent" ref="af6cfee4cde7c6d96aec1fd49d3768113" args=")(PP_Resource file_ref)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(* <a class="el" href="struct_p_p_b___file_ref__1__2.html#af6cfee4cde7c6d96aec1fd49d3768113">PPB_FileRef::GetParent</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___file_ref__1__2.html#af6cfee4cde7c6d96aec1fd49d3768113" title="GetParent() returns the parent directory of this file.">GetParent()</a> returns the parent directory of this file. </p>
<p>If <code>file_ref</code> points to the root of the filesystem, then the root is returned.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">file_ref</td><td>A <code>PP_Resource</code> corresponding to a file reference.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Resource</code> containing the parent directory of the file. This function fails if the file system type is <code>PP_FileSystemType_External</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="aafb00e9a6100b5a1490819606ed36451"></a><!-- doxytag: member="PPB_FileRef::GetPath" ref="aafb00e9a6100b5a1490819606ed36451" args=")(PP_Resource file_ref)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(* <a class="el" href="struct_p_p_b___file_ref__1__2.html#aafb00e9a6100b5a1490819606ed36451">PPB_FileRef::GetPath</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref)<code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___file_ref__1__2.html#aafb00e9a6100b5a1490819606ed36451" title="GetPath() returns the absolute path of the file.">GetPath()</a> returns the absolute path of the file. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">file_ref</td><td>A <code>PP_Resource</code> corresponding to a file reference.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code><a class="el" href="struct_p_p___var.html" title="The PP_VAR struct is a variant data type and can contain any value of one of the types named in the P...">PP_Var</a></code> containing the absolute path of the file. This function fails if the file system type is <code>PP_FileSystemType_External</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="a53f053134366e9491aee0b88e08346c8"></a><!-- doxytag: member="PPB_FileRef::IsFileRef" ref="a53f053134366e9491aee0b88e08346c8" args=")(PP_Resource resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___file_ref__1__2.html#a53f053134366e9491aee0b88e08346c8">PPB_FileRef::IsFileRef</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___file_ref__1__2.html#a53f053134366e9491aee0b88e08346c8" title="IsFileRef() determines if the provided resource is a file reference.">IsFileRef()</a> determines if the provided resource is a file reference. </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>PP_Resource</code> corresponding to a file reference.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>PP_TRUE</code> if the resource is a <code>PPB_FileRef</code>, <code>PP_FALSE</code> if the resource is invalid or some type other than <code>PPB_FileRef</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="a829f880110d9d0756552a7070a08ed33"></a><!-- doxytag: member="PPB_FileRef::MakeDirectory" ref="a829f880110d9d0756552a7070a08ed33" args=")(PP_Resource directory_ref, int32_t make_directory_flags, struct PP_CompletionCallback callback)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___file_ref__1__2.html#a829f880110d9d0756552a7070a08ed33">PPB_FileRef::MakeDirectory</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> directory_ref, int32_t make_directory_flags, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___file_ref__1__2.html#a829f880110d9d0756552a7070a08ed33" title="MakeDirectory() makes a new directory in the file system according to the given make_directory_flags...">MakeDirectory()</a> makes a new directory in the file system according to the given <code>make_directory_flags</code>, which is a bit-mask of the <code>PP_MakeDirectoryFlags</code> values. </p>
<p>It is not valid to make a directory in the external file system.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">file_ref</td><td>A <code>PP_Resource</code> corresponding to a file reference. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">make_directory_flags</td><td>A bit-mask of the <code>PP_MakeDirectoryFlags</code> values. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called upon completion of <a class="el" href="struct_p_p_b___file_ref__1__2.html#a829f880110d9d0756552a7070a08ed33" title="MakeDirectory() makes a new directory in the file system according to the given make_directory_flags...">MakeDirectory()</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. </dd></dl>
</div>
</div>
<a class="anchor" id="abc723bde3892c6e5d323497070a08a60"></a><!-- doxytag: member="PPB_FileRef::Query" ref="abc723bde3892c6e5d323497070a08a60" args=")(PP_Resource file_ref, struct PP_FileInfo *info, struct PP_CompletionCallback callback)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___file_ref__1__2.html#abc723bde3892c6e5d323497070a08a60">PPB_FileRef::Query</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref, struct <a class="el" href="struct_p_p___file_info.html">PP_FileInfo</a> *info, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___file_ref__1__2.html#abc723bde3892c6e5d323497070a08a60" title="Query() queries info about a file or directory.">Query()</a> queries info about a file or directory. </p>
<p>You must have access to read this file or directory if it exists in the external filesystem.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">file_ref</td><td>A <code>PP_Resource</code> corresponding to a file reference. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">info</td><td>A pointer to a <code><a class="el" href="struct_p_p___file_info.html" title="The PP_FileInfo struct represents all information about a file, such as size, type, and creation time.">PP_FileInfo</a></code> which will be populated with information about the file or directory. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called upon completion of <a class="el" href="struct_p_p_b___file_ref__1__2.html#abc723bde3892c6e5d323497070a08a60" title="Query() queries info about a file or directory.">Query()</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. </dd></dl>
</div>
</div>
<a class="anchor" id="adf5ee82e600680aae53cd70e39e9a568"></a><!-- doxytag: member="PPB_FileRef::ReadDirectoryEntries" ref="adf5ee82e600680aae53cd70e39e9a568" args=")(PP_Resource file_ref, struct PP_ArrayOutput output, struct PP_CompletionCallback callback)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___file_ref__1__2.html#adf5ee82e600680aae53cd70e39e9a568">PPB_FileRef::ReadDirectoryEntries</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref, struct <a class="el" href="struct_p_p___array_output.html">PP_ArrayOutput</a> output, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___file_ref__1__2.html#adf5ee82e600680aae53cd70e39e9a568" title="ReadDirectoryEntries() reads all entries in a directory.">ReadDirectoryEntries()</a> reads all entries in a directory. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">file_ref</td><td>A <code>PP_Resource</code> corresponding to a directory reference. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">output</td><td>An output array which will receive <code><a class="el" href="struct_p_p___directory_entry.html">PP_DirectoryEntry</a></code> objects on success. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to run on completion.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. </dd></dl>
</div>
</div>
<a class="anchor" id="a5139b53dae2953f5e3ec18a3b4ad93fa"></a><!-- doxytag: member="PPB_FileRef::Rename" ref="a5139b53dae2953f5e3ec18a3b4ad93fa" args=")(PP_Resource file_ref, PP_Resource new_file_ref, struct PP_CompletionCallback callback)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___file_ref__1__2.html#a5139b53dae2953f5e3ec18a3b4ad93fa">PPB_FileRef::Rename</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> new_file_ref, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___file_ref__1__2.html#a5139b53dae2953f5e3ec18a3b4ad93fa" title="Rename() renames a file or directory.">Rename()</a> renames a file or directory. </p>
<p>Arguments <code>file_ref</code> and <code>new_file_ref</code> must both refer to files in the same file system. It is an error to rename a file or directory that is in use. It is not valid to rename a file in the external file system.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">file_ref</td><td>A <code>PP_Resource</code> corresponding to a file reference. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">new_file_ref</td><td>A <code>PP_Resource</code> corresponding to a new file reference. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called upon completion of <a class="el" href="struct_p_p_b___file_ref__1__2.html#a5139b53dae2953f5e3ec18a3b4ad93fa" title="Rename() renames a file or directory.">Rename()</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. </dd></dl>
</div>
</div>
<a class="anchor" id="a7a83c853e8066a47eb7f222967ac4559"></a><!-- doxytag: member="PPB_FileRef::Touch" ref="a7a83c853e8066a47eb7f222967ac4559" args=")(PP_Resource file_ref, PP_Time last_access_time, PP_Time last_modified_time, struct PP_CompletionCallback callback)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___file_ref__1__2.html#a7a83c853e8066a47eb7f222967ac4559">PPB_FileRef::Touch</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref, <a class="el" href="group___typedefs.html#ga537b277d2116e42b6acfe9323d40e1a0">PP_Time</a> last_access_time, <a class="el" href="group___typedefs.html#ga537b277d2116e42b6acfe9323d40e1a0">PP_Time</a> last_modified_time, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___file_ref__1__2.html#a7a83c853e8066a47eb7f222967ac4559" title="Touch() Updates time stamps for a file.">Touch()</a> Updates time stamps for a file. </p>
<p>You must have write access to the file if it exists in the external filesystem.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">file_ref</td><td>A <code>PP_Resource</code> corresponding to a file reference. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">last_access_time</td><td>The last time the file was accessed. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">last_modified_time</td><td>The last time the file was modified. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called upon completion of <a class="el" href="struct_p_p_b___file_ref__1__2.html#a7a83c853e8066a47eb7f222967ac4559" title="Touch() Updates time stamps for a file.">Touch()</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. </dd></dl>
</div>
</div>
<hr />The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="ppb__file__ref_8h.html">ppb_file_ref.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}