aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/webguide/api/file_system/index.html
blob: 90ace79b50c46503a6229061aa387643ffe511c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
title: File System API guide
slug: WebGuide/API/File_System
translation_of: Web/API/File_and_Directory_Entries_API/Introduction
translation_of_original: WebGuide/API/File_System
---
<p>{{ SeeCompatTable() }}</p>
<p>The File System API simulates a local file system that web apps can navigate around. You can develop apps that can read, write, and create files and directories in a virtual, sandboxed file system.</p>
<p>The asynchronous API methods return without blocking the calling thread. The asynchronous API doesn't give you data by returning values; instead, you have to pass a callback function. The synchronous API is intended to be used inside <a href="/en/DOM/Worker" title="Worker">WebWorkers</a>.</p>
<p>For an overview of the File System API, see the following articles:</p>
<p>{{ListSubpages}}</p>
<h2 id="Browser_Compatibility" name="Browser_Compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Chrome</th>
    <th>Firefox (Gecko)</th>
    <th>Internet Explorer</th>
    <th>Opera</th>
    <th>Safari (WebKit)</th>
   </tr>
   <tr>
    <td>Asynchronous API</td>
    <td>13 {{ property_prefix("webkit") }}</td>
    <td>{{ CompatNo() }}</td>
    <td>{{ CompatNo() }}</td>
    <td>15 {{ property_prefix("webkit") }}</td>
    <td>{{ CompatNo() }}</td>
   </tr>
   <tr>
    <td>Synchronous API</td>
    <td>13 {{ property_prefix("webkit") }}</td>
    <td>{{ CompatNo() }}</td>
    <td>{{ CompatNo() }}</td>
    <td>15 {{ property_prefix("webkit") }}</td>
    <td>{{ CompatNo() }}</td>
   </tr>
  </tbody>
 </table>
</div>
<div id="compat-mobile">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Android</th>
    <th>Chrome for Android</th>
    <th>Firefox Mobile (Gecko)</th>
    <th>IE Phone</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
   </tr>
   <tr>
    <td>Asynchronous API</td>
    <td>{{ CompatNo() }}</td>
    <td>0.16{{ property_prefix("webkit") }}</td>
    <td>{{ CompatNo() }}</td>
    <td>{{ CompatNo() }}</td>
    <td>14 {{ property_prefix("webkit") }}</td>
    <td>{{ CompatNo() }}</td>
   </tr>
   <tr>
    <td>Synchronous API</td>
    <td>{{ CompatNo() }}</td>
    <td>0.16{{ property_prefix("webkit") }}</td>
    <td>{{ CompatNo() }}</td>
    <td>{{ CompatNo() }}</td>
    <td>14 {{ property_prefix("webkit") }}</td>
    <td>{{ CompatNo() }}</td>
   </tr>
  </tbody>
 </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
 <li><a href="/en-US/docs/Web/Reference/File_System_API" title="/en-US/docs/Web/Reference/File_System_API">File System API reference</a></li>
 <li>Specification: {{ spec("http://dev.w3.org/2009/dap/file-system/pub/FileSystem/", "File API: Directories and System Specification", "WD") }}</li>
</ul>