1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = Blob , extends = :: js_sys :: Object , js_name = File , typescript_type = "File")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `File` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `File`*"]
14 pub type File;
15 # [wasm_bindgen (structural , method , getter , js_class = "File" , js_name = name)]
16 #[doc = "Getter for the `name` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File/name)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `File`*"]
21 pub fn name(this: &File) -> String;
22 # [wasm_bindgen (structural , method , getter , js_class = "File" , js_name = lastModified)]
23 #[doc = "Getter for the `lastModified` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File/lastModified)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `File`*"]
28 pub fn last_modified(this: &File) -> f64;
29 #[wasm_bindgen(catch, constructor, js_class = "File")]
30 #[doc = "The `new File(..)` constructor, creating a new instance of `File`."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File/File)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `File`*"]
35 pub fn new_with_buffer_source_sequence(
36 file_bits: &::wasm_bindgen::JsValue,
37 file_name: &str,
38 ) -> Result<File, JsValue>;
39 #[wasm_bindgen(catch, constructor, js_class = "File")]
40 #[doc = "The `new File(..)` constructor, creating a new instance of `File`."]
41 #[doc = ""]
42 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File/File)"]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `File`*"]
45 pub fn new_with_u8_array_sequence(
46 file_bits: &::wasm_bindgen::JsValue,
47 file_name: &str,
48 ) -> Result<File, JsValue>;
49 #[wasm_bindgen(catch, constructor, js_class = "File")]
50 #[doc = "The `new File(..)` constructor, creating a new instance of `File`."]
51 #[doc = ""]
52 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File/File)"]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `File`*"]
55 pub fn new_with_blob_sequence(
56 file_bits: &::wasm_bindgen::JsValue,
57 file_name: &str,
58 ) -> Result<File, JsValue>;
59 #[wasm_bindgen(catch, constructor, js_class = "File")]
60 #[doc = "The `new File(..)` constructor, creating a new instance of `File`."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File/File)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `File`*"]
65 pub fn new_with_str_sequence(
66 file_bits: &::wasm_bindgen::JsValue,
67 file_name: &str,
68 ) -> Result<File, JsValue>;
69 #[cfg(feature = "FilePropertyBag")]
70 #[wasm_bindgen(catch, constructor, js_class = "File")]
71 #[doc = "The `new File(..)` constructor, creating a new instance of `File`."]
72 #[doc = ""]
73 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File/File)"]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `File`, `FilePropertyBag`*"]
76 pub fn new_with_buffer_source_sequence_and_options(
77 file_bits: &::wasm_bindgen::JsValue,
78 file_name: &str,
79 options: &FilePropertyBag,
80 ) -> Result<File, JsValue>;
81 #[cfg(feature = "FilePropertyBag")]
82 #[wasm_bindgen(catch, constructor, js_class = "File")]
83 #[doc = "The `new File(..)` constructor, creating a new instance of `File`."]
84 #[doc = ""]
85 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File/File)"]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `File`, `FilePropertyBag`*"]
88 pub fn new_with_u8_array_sequence_and_options(
89 file_bits: &::wasm_bindgen::JsValue,
90 file_name: &str,
91 options: &FilePropertyBag,
92 ) -> Result<File, JsValue>;
93 #[cfg(feature = "FilePropertyBag")]
94 #[wasm_bindgen(catch, constructor, js_class = "File")]
95 #[doc = "The `new File(..)` constructor, creating a new instance of `File`."]
96 #[doc = ""]
97 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File/File)"]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `File`, `FilePropertyBag`*"]
100 pub fn new_with_blob_sequence_and_options(
101 file_bits: &::wasm_bindgen::JsValue,
102 file_name: &str,
103 options: &FilePropertyBag,
104 ) -> Result<File, JsValue>;
105 #[cfg(feature = "FilePropertyBag")]
106 #[wasm_bindgen(catch, constructor, js_class = "File")]
107 #[doc = "The `new File(..)` constructor, creating a new instance of `File`."]
108 #[doc = ""]
109 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File/File)"]
110 #[doc = ""]
111 #[doc = "*This API requires the following crate features to be activated: `File`, `FilePropertyBag`*"]
112 pub fn new_with_str_sequence_and_options(
113 file_bits: &::wasm_bindgen::JsValue,
114 file_name: &str,
115 options: &FilePropertyBag,
116 ) -> Result<File, JsValue>;
117}
118