| <!DOCTYPE html> |
| <html> |
| <!-- |
| Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| --> |
| <head> |
| <meta http-equiv="Pragma" content="no-cache"> |
| <meta http-equiv="Expires" content="-1"> |
| <title>{{title}}</title> |
| <script type="text/javascript" src="common.js"></script> |
| <script type ="text/javascript" src="example.js"></script> |
| </head> |
| <body {{attrs}}> |
| <h1>{{title}}</h1> |
| <h2>Status: <code id="statusField">NO-STATUS</code></h2> |
| <p> |
| This example shows how to pass a Chrome FileSystem to the Native Client |
| module. The standard Pepper FileSystem (see examples/api/file_io) only |
| allows you to write to a sandboxed filesystem, but the Chrome FileSystem |
| allows you to write directly to a directory on the user's filesystem. |
| </p> |
| <p>The Chrome FileSystem is only supported for Chrome Apps.</p> |
| <p> |
| Click the button below and choose a directory. A new FileSystem will be |
| created which contains that directory. It will then be passed to the Native |
| Client module, where it will be used to write a file in that directory |
| called hello_from_nacl.txt. |
| </p> |
| <div> |
| <input type="button" id="choosedir" value="Choose Directory"> |
| <pre id="log"></pre> |
| <div id="listener"></div> |
| </body> |
| </html> |