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

Side by Side Diff: native_client_sdk/src/examples/hello_nacl_mounts/index.html

Issue 12194030: Rename mount (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix c file. Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <!--
4 Copyright (c) 2012 The Chromium Authors. All rights reserved.
5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file.
7 -->
8 <head>
9 <meta http-equiv="Pragma" content="no-cache">
10 <meta http-equiv="Expires" content="-1">
11 <title><TITLE></title>
12 <script type="text/javascript" src="common.js"></script>
13 <script type="text/javascript" src="example.js"></script>
14 </head>
15 <body data-name="<NAME>" data-tc="<tc>" data-path="<path>"
16 data-custom-load="true">
17 <h1><TITLE></h1>
18 <h2>Status: <code id="statusField">NO-STATUS</code></h2>
19 <p>
20 This example shows how you can use standard C library file operation
21 functions in Native Client using a library called nacl_mounts.
22 </p>
23 <p>
24 nacl_mounts provides a virtual filesystem. The filesystem can be "mounted"
25 in a given directory tree. When you perform operations on files in those
26 directories, the mount determines how those operations should be performed.
27 </p>
28 <p>
29 This example has three mounts by default.
30 <ol>
31 <li><i>/</i> the root of the filesystem. This is a memory mount, and
32 is non-persistent.</li>
33 <li><i>/persistent</i> a persistent storage area. Any data written
34 here can be read back after Chrome is restarted.</li>
35 <li><i>/http</i> a mount that can read from a URL. Try reading from
36 /http/index.html.</li>
37 <li><i>/dev</i> a mount containing some utility files. /dev/null,
38 /dev/zero, etc.</li>
39 </ol>
40 </p>
41 <div>
42 <span>
43 <input type="radio" id="radiofopen" name="group" checked="checked">fopen
44 <input type="radio" id="radiofclose" name="group">fclose
45 <input type="radio" id="radiofread" name="group">fread
46 <input type="radio" id="radiofwrite" name="group">fwrite
47 <input type="radio" id="radiofseek" name="group">fseek
48 </span>
49 </div>
50 <div class="function" id="fopen">
51 <span>
52 Filename:
53 <input type="text" id="fopenFilename">
54 <select id="fopenMode">
55 <option value="r">Read Existing (r)</option>
56 <option value="r+">Read/Write Existing (r+)</option>
57 <option value="w">Write New File (w)</option>
58 <option value="w+">Read/Write New File (w+)</option>
59 <option value="a">Append Write (a)</option>
60 <option value="w+">Append Read/Write (a+)</option>
61 </select>
62 <button id="fopenExecute">fopen</button>
63 </span>
64 </div>
65 <div class="function" id="fclose" hidden>
66 <span>
67 <select class="file-handle" id="fcloseHandle"></select>
68 <button id="fcloseExecute">fclose</button>
69 </span>
70 </div>
71 <div class="function" id="fread" hidden>
72 <span>
73 <select class="file-handle" id="freadHandle"></select>
74 Count:
75 <input type="text" id="freadBytes">
76 <button id="freadExecute">fread</button>
77 </span>
78 </div>
79 <div class="function" id="fwrite" hidden>
80 <span>
81 <select class="file-handle" id="fwriteHandle"></select>
82 Data:
83 <input type="text" id="fwriteData">
84 <button id="fwriteExecute">fwrite</button>
85 </span>
86 </div>
87 <div class="function" id="fseek" hidden>
88 <span>
89 <select class="file-handle" id="fseekHandle"></select>
90 Offset:
91 <input type="text" id="fseekOffset">
92 Whence:
93 <select id="fseekWhence">
94 <option value="0">SEEK_SET</option>
95 <option value="1">SEEK_CUR</option>
96 <option value="2">SEEK_END</option>
97 </select>
98 <button id="fseekExecute">fseek</button>
99 </span>
100 </div>
101 <!-- The NaCl plugin will be embedded inside the element with id "listener".
102 See common.js.-->
103 <div id="listener"></div>
104 <div id="log"></div>
105 </body>
106 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698