From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- files/zh-tw/web/api/filesystem/index.html | 118 ++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 files/zh-tw/web/api/filesystem/index.html (limited to 'files/zh-tw/web/api/filesystem') diff --git a/files/zh-tw/web/api/filesystem/index.html b/files/zh-tw/web/api/filesystem/index.html new file mode 100644 index 0000000000..49b4f70b84 --- /dev/null +++ b/files/zh-tw/web/api/filesystem/index.html @@ -0,0 +1,118 @@ +--- +title: FileSystem +slug: Web/API/FileSystem +tags: + - 檔案系統 +translation_of: Web/API/FileSystem +--- +

{{APIRef("File System API")}} {{non-standard_header}}

+ +

FileSystem 實作文件和目錄介面,描述一個檔案系統。在任何檔案系統上,這個物件包含 {{domxref("FileSystemEntry.filesystem", "filesystem")}}的特性。某些網頁瀏覽器提供額外的API去創建和管理檔案系統,如Google Chrome的{{domxref("LocalFileSystem.requestFileSystem", "requestFileSystem()")}}函式。

+ +
+

此介面並非標準API, 代表規格並未依造標準制定, 因此必須注意並非所有網頁瀏覽器都有實作此介面, 有實作的網頁瀏覽器可能只有實作一小部分. 請在{{anch("Browser compatibility")}} 查看更多細節.

+
+ +

基礎概念

+ +

存取 FileSystem 物件的兩種方法:

+ +
    +
  1. 你可以直接要求一個使用window.requestFileSystem(),只用在你的網頁應用程式的沙盒類型 FileSystem 物件。如果要求成功,將會執行callback handler去接收描述檔案系統的FileSystem物件參數。
  2. +
  3. 你可以從檔案系統接口物件取得,透過他的{{domxref("FileSystemEntry.filesystem", "filesystem")}}特性
  4. +
+ +

屬性

+ +
+
{{domxref("FileSystem.name")}} {{ReadOnlyInline}}
+
{{domxref("USVString")}} 代表檔案系統的名稱. 此名稱在整個已宣告的檔案系統清單中是唯一的。
+
{{domxref("FileSystem.root")}} {{ReadOnlyInline}}
+
 {{domxref("FileSystemDirectoryEntry")}} 物件表示檔案系統的根目錄。 透過此物件, 你可以取得權限存取所有檔案系統中的文件和目錄
+
+ +

規範

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('File System API')}}{{Spec2('File System API')}}Draft of proposed API
+ +

This API has no official W3C or WHATWG specification.

+ +

瀏覽器相容性

+ +

{{ CompatibilityTable }}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerMicrosoft EdgeOperaSafari (WebKit)
Basic support13{{ property_prefix("webkit") }}{{ CompatGeckoDesktop(50) }}{{ CompatNo }}{{CompatVersionUnknown}}[1]{{ CompatNo }}{{ CompatNo }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{ CompatNo }}0.16{{ property_prefix("webkit") }}{{ CompatGeckoMobile(50) }}{{ CompatNo }}{{ CompatNo }}{{ CompatNo }}
+
+ +

[1] Microsoft Edge 使用 WebKitFileSystem 名稱實作, 且只被用在 drag-and-drop scenarios 透過 {{domxref("DataTransferItem.webkitGetAsEntry()")}} 函式. 此函式不被使用在文件和目錄選擇的面板( 如當你以{{domxref("HTMLInputElement.webkitdirectory")}} 標籤使用 {{HTMLElement("input")}} 物件

+ +

參見

+ + -- cgit v1.2.3-54-g00ecf