From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- files/vi/web/api/file/index.html | 99 ---------------------------------------- 1 file changed, 99 deletions(-) delete mode 100644 files/vi/web/api/file/index.html (limited to 'files/vi/web/api/file') diff --git a/files/vi/web/api/file/index.html b/files/vi/web/api/file/index.html deleted file mode 100644 index 3722df4e46..0000000000 --- a/files/vi/web/api/file/index.html +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: File -slug: Web/API/File -tags: - - API - - File API - - Interface - - Reference - - Web -translation_of: Web/API/File ---- -
{{APIRef}}
- -

File cung cấp thông tin về các tệp và cho phép Javascript truy cập nội dung của chúng.

- -

File thường được lấy từ một {{DOMxRef("FileList")}} đối tượng trả về như là kết quả của người dùng chọn files sử dụng phần tử {{HTMLElement("input")}}, từ thao tác kéo và thả đối tượng {{DOMxRef("DataTransfer")}}, hoặc là từ mozGetAsFile() API trên một {{DOMxRef("HTMLCanvasElement")}}.

- -

Đối tượng file là một loại {{DOMxRef("Blob")}}, và có thể sử dụng trong mọi hoàn cảnh mà Blob có thể sử dụng. Cụ thể, {{DOMxRef("FileReader")}}, {{DOMxRef("URL.createObjectURL()")}}, {{DOMxRef("ImageBitmapFactories.createImageBitmap()", "createImageBitmap()")}}, và {{DOMxRef("XMLHttpRequest", "", "send()")}} chấp nhận cả Blobs và Files.

- -

Đọc Using files from web applications để biết thêm thông tin và ví dụ.

- -

{{InheritanceDiagram}}

- -

Constructor

- -
-
{{DOMxRef("File.File", "File()")}}
-
Trả về một constructed File mới.
-
- -

Thuộc tính

- -
-
{{DOMxRef("File.lastModified")}} {{ReadOnlyInline}}
-
Trả về thời gian sửa đổi cuối cùng của file, tính bằng mili giây kể từ kỉ nguyên UNIX (January 1st, 1970 at Midnight).
-
{{DOMxRef("File.lastModifiedDate")}} {{Deprecated_Inline}} {{ReadOnlyInline}}
-
Returns the last modified {{JSxRef("Date")}} of the file referenced by the File object.
-
{{DOMxRef("File.name")}}{{ReadOnlyInline}}
-
Trả về tên của tệp referenced by the File object.
-
{{DOMxRef("File.webkitRelativePath")}} {{Non-standard_Inline}} {{ReadOnlyInline}}
-
Trả về đường dẫn (URL) của {{DOMxRef("File")}} có liên quan.
-
- -

File bổ sung {{DOMxRef("Blob")}}, Vì vậy, nó cũng có các thuộc tính có sẵn:

- -
-
{{DOMxRef("File.size")}} {{ReadOnlyInline}}
-
Trả về kích thước của file (tính bằng bytes)
-
{{DOMxRef("File.type")}} {{ReadOnlyInline}}
-
Trả về thể loại MIME của file file.
-
- -

Phương thức

- -

File không có phương thức nào, nhưng nó thừa kế từ {{DOMxRef("Blob")}}:

- -
-
{{DOMxRef("Blob.slice()", "Blob.slice([start[, end[, contentType]]])")}}
-
Trả về một đối tượng Blob mới có nội dung trong phạm vi bytes chỉ định của Blob
-
{{DOMxRef("Blob.stream()")}}
-
Chuyển đổi file thành {{DOMxRef("ReadableStream")}} vì vậy có thể sử dụng để đọc nội dung file.
-
{{DOMxRef("Blob.text()")}}
-
Chuyển đổi file thành stream và đọc nó để hoàn thành. Nó trả về một promise có thể giải quyết với {{DOMxRef("USVString")}} (text).
-
{{DOMxRef("Blob.arrayBuffer()")}}
-
Chuyển đổi file thành stream và đọc nó để hoàn thành. Nó trả về một promise có thể giải quyết với {{DOMxRef("ArrayBuffer")}}.
-
- -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('File API', "#file-section", "The File interface")}}{{Spec2('File API')}}Initial definition.
- -

Browser compatibility

- - - -

{{Compat("api.File")}}

- -

Xem thêm

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