From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/filesystem/index.html | 105 ++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 files/zh-cn/web/api/filesystem/index.html (limited to 'files/zh-cn/web/api/filesystem') diff --git a/files/zh-cn/web/api/filesystem/index.html b/files/zh-cn/web/api/filesystem/index.html new file mode 100644 index 0000000000..77b9234e72 --- /dev/null +++ b/files/zh-cn/web/api/filesystem/index.html @@ -0,0 +1,105 @@ +--- +title: FileSystem +slug: Web/API/FileSystem +translation_of: Web/API/FileSystem +--- +
+{{APIRef("File System API")}} {{non-standard_header}} +
+ +

File System API 中,一个 FileSystem 对象代表着一个文件系统。这个对象是调用 requestFileSystem() 成功的一个标志。FileSystem 对象有两个属性。

+ +

关于本文档

+ +

本文档的上次更新是 2012 年 3 月 2 日,引用来源是 2011 年 4 月 9 日的草案 W3C Specifications (Working Draft)
+ 该草案似乎已经被放弃了,任何实现不应该参考这份草案,也不该引用它。

+ +

基本概念

+ +

你可以通过调用 window.requestFileSystem() 来请求对一个沙盒文件系统的访问权限。调用 requestFileSystem() 会创建一个新的沙盒存储空间。成功调用之后会返回一个 FileSystem 对象。它有两个属性:名称和文件系统的根目录。

+ +

FileSystem 对象是你访问文件系统所必须的,所以你最好为它创建一个引用,然后储存起来。

+ +

属性

+ + + + + + + + + + + + + + + + + + + + + +
属性类型解释
name只读的 DOMString文件系统的名称。The name must be unique across the list of exposed file systems.
root只读的目录实体文件系统的根目录。
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
功能ChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
基本支持13{{ property_prefix("webkit") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
功能AndroidChrome for AndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
基本支持{{ CompatNo() }}0.16{{ property_prefix("webkit") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
+
+ +

相关链接

+ +

规范:{{ spec("http://www.w3.org/TR/file-system-api/", "File API: Directories and System Specification", "WD") }}

+ +

引用: File System API

+ +

介绍: Basic Concepts About the File System API

-- cgit v1.2.3-54-g00ecf