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