Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: native_client_sdk/doc_generated/devguide/coding/file-io.html

Issue 476793002: Per P0 reqs add launch pts + make download obvious. Also misc cpy edits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CL synced with master. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 {{+bindTo:partials.standard_nacl_article}} 1 {{+bindTo:partials.standard_nacl_article}}
2 2
3 <section id="file-i-o"> 3 <section id="file-i-o">
4 <span id="devguide-coding-fileio"></span><h1 id="file-i-o"><span id="devguide-co ding-fileio"></span>File I/O</h1> 4 <span id="devguide-coding-fileio"></span><h1 id="file-i-o"><span id="devguide-co ding-fileio"></span>File I/O</h1>
5 <div class="contents local" id="contents" style="display: none"> 5 <div class="contents local" id="contents" style="display: none">
6 <ul class="small-gap"> 6 <ul class="small-gap">
7 <li><a class="reference internal" href="#introduction" id="id2">Introduction</a> </li> 7 <li><a class="reference internal" href="#introduction" id="id2">Introduction</a> </li>
8 <li><a class="reference internal" href="#reference-information" id="id3">Referen ce information</a></li> 8 <li><a class="reference internal" href="#reference-information" id="id3">Referen ce information</a></li>
9 <li><p class="first"><a class="reference internal" href="#local-file-i-o" id="id 4">Local file I/O</a></p> 9 <li><p class="first"><a class="reference internal" href="#local-file-i-o" id="id 4">Local file I/O</a></p>
10 <ul class="small-gap"> 10 <ul class="small-gap">
(...skipping 18 matching lines...) Expand all
29 <li><a class="reference internal" href="#saving-a-file" id="id17">Saving a file< /a></li> 29 <li><a class="reference internal" href="#saving-a-file" id="id17">Saving a file< /a></li>
30 <li><a class="reference internal" href="#loading-a-file" id="id18">Loading a fil e</a></li> 30 <li><a class="reference internal" href="#loading-a-file" id="id18">Loading a fil e</a></li>
31 <li><a class="reference internal" href="#id1" id="id19">Deleting a file</a></li> 31 <li><a class="reference internal" href="#id1" id="id19">Deleting a file</a></li>
32 <li><a class="reference internal" href="#listing-files-in-a-directory" id="id20" >Listing files in a directory</a></li> 32 <li><a class="reference internal" href="#listing-files-in-a-directory" id="id20" >Listing files in a directory</a></li>
33 <li><a class="reference internal" href="#making-a-new-directory" id="id21">Makin g a new directory</a></li> 33 <li><a class="reference internal" href="#making-a-new-directory" id="id21">Makin g a new directory</a></li>
34 </ul> 34 </ul>
35 </li> 35 </li>
36 </ul> 36 </ul>
37 37
38 </div><h2 id="introduction">Introduction</h2> 38 </div><h2 id="introduction">Introduction</h2>
39 <p>This chapter describes how to use the <a class="reference external" href="/na tive-client/pepper_stable/cpp/classpp_1_1_file_i_o">FileIO API</a> to read and w rite 39 <p>This section describes how to use the <a class="reference external" href="/na tive-client/pepper_stable/cpp/classpp_1_1_file_i_o">FileIO API</a> to read and w rite
40 files using a local secure data store.</p> 40 files using a local secure data store.</p>
41 <p>You might use the File IO API with the URL Loading APIs to create an overall 41 <p>You might use the File IO API with the URL Loading APIs to create an overall
42 data download and caching solution for your NaCl applications. For example:</p> 42 data download and caching solution for your NaCl applications. For example:</p>
43 <ol class="arabic simple"> 43 <ol class="arabic simple">
44 <li>Use the File IO APIs to check the local disk to see if a file exists that 44 <li>Use the File IO APIs to check the local disk to see if a file exists that
45 your program needs.</li> 45 your program needs.</li>
46 <li>If the file exists locally, load it into memory using the File IO API. If 46 <li>If the file exists locally, load it into memory using the File IO API. If
47 the file doesn&#8217;t exist locally, use the URL Loading API to retrieve the 47 the file doesn&#8217;t exist locally, use the URL Loading API to retrieve the
48 file from the server.</li> 48 file from the server.</li>
49 <li>Use the File IO API to write the file to disk.</li> 49 <li>Use the File IO API to write the file to disk.</li>
50 <li>Load the file into memory using the File IO API when needed by your 50 <li>Load the file into memory using the File IO API when needed by your
51 application.</li> 51 application.</li>
52 </ol> 52 </ol>
53 <p>The example discussed in this chapter is included in the SDK in the directory 53 <p>The example discussed in this section is included in the SDK in the directory
54 <code>examples/api/file_io</code>.</p> 54 <code>examples/api/file_io</code>.</p>
55 <h2 id="reference-information">Reference information</h2> 55 <h2 id="reference-information">Reference information</h2>
56 <p>For reference information related to FileIO, see the following documentation: </p> 56 <p>For reference information related to FileIO, see the following documentation: </p>
57 <ul class="small-gap"> 57 <ul class="small-gap">
58 <li><a class="reference external" href="/native-client/pepper_stable/cpp/file__i o_8h">file_io.h</a> - API to create a 58 <li><a class="reference external" href="/native-client/pepper_stable/cpp/file__i o_8h">file_io.h</a> - API to create a
59 FileIO object</li> 59 FileIO object</li>
60 <li><a class="reference external" href="/native-client/pepper_stable/cpp/file__r ef_8h">file_ref.h</a> - API to create 60 <li><a class="reference external" href="/native-client/pepper_stable/cpp/file__r ef_8h">file_ref.h</a> - API to create
61 a file reference or &#8220;weak pointer&#8221; to a file in a file system</li> 61 a file reference or &#8220;weak pointer&#8221; to a file in a file system</li>
62 <li><a class="reference external" href="/native-client/pepper_stable/cpp/file__s ystem_8h">file_system.h</a> - API to 62 <li><a class="reference external" href="/native-client/pepper_stable/cpp/file__s ystem_8h">file_system.h</a> - API to
63 create a file system associated with a file</li> 63 create a file system associated with a file</li>
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 PP_MAKEDIRECTORYFLAG_NONE, pp::BlockUntilComplete()); 468 PP_MAKEDIRECTORYFLAG_NONE, pp::BlockUntilComplete());
469 if (result != PP_OK) { 469 if (result != PP_OK) {
470 ShowErrorMessage(&quot;Make directory failed&quot;, result); 470 ShowErrorMessage(&quot;Make directory failed&quot;, result);
471 return; 471 return;
472 } 472 }
473 ShowStatusMessage(&quot;Make directory success&quot;); 473 ShowStatusMessage(&quot;Make directory success&quot;);
474 </pre> 474 </pre>
475 </section> 475 </section>
476 476
477 {{/partials.standard_nacl_article}} 477 {{/partials.standard_nacl_article}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698