Skip to main content

web_sys/features/
gen_FileSystemFileHandle.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "FileSystemHandle",
9        extends = "::js_sys::Object",
10        js_name = "FileSystemFileHandle",
11        typescript_type = "FileSystemFileHandle"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `FileSystemFileHandle` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `FileSystemFileHandle`*"]
19    pub type FileSystemFileHandle;
20    #[wasm_bindgen(
21        method,
22        js_class = "FileSystemFileHandle",
23        js_name = "createSyncAccessHandle"
24    )]
25    #[doc = "The `createSyncAccessHandle()` method."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/createSyncAccessHandle)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `FileSystemFileHandle`*"]
30    pub fn create_sync_access_handle(this: &FileSystemFileHandle) -> ::js_sys::Promise;
31    #[cfg(web_sys_unstable_apis)]
32    #[cfg(all(
33        feature = "FileSystemSyncAccessHandle",
34        feature = "FileSystemSyncAccessHandleOptions",
35    ))]
36    #[wasm_bindgen(
37        method,
38        js_class = "FileSystemFileHandle",
39        js_name = "createSyncAccessHandle"
40    )]
41    #[doc = "The `createSyncAccessHandle()` method."]
42    #[doc = ""]
43    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/createSyncAccessHandle)"]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `FileSystemFileHandle`, `FileSystemSyncAccessHandle`, `FileSystemSyncAccessHandleOptions`*"]
46    #[doc = ""]
47    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
48    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
49    pub fn create_sync_access_handle_with_options(
50        this: &FileSystemFileHandle,
51        options: &FileSystemSyncAccessHandleOptions,
52    ) -> ::js_sys::Promise<FileSystemSyncAccessHandle>;
53    #[wasm_bindgen(method, js_class = "FileSystemFileHandle", js_name = "createWritable")]
54    #[doc = "The `createWritable()` method."]
55    #[doc = ""]
56    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/createWritable)"]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `FileSystemFileHandle`*"]
59    pub fn create_writable(this: &FileSystemFileHandle) -> ::js_sys::Promise;
60    #[cfg(feature = "FileSystemCreateWritableOptions")]
61    #[wasm_bindgen(method, js_class = "FileSystemFileHandle", js_name = "createWritable")]
62    #[doc = "The `createWritable()` method."]
63    #[doc = ""]
64    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/createWritable)"]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`, `FileSystemFileHandle`*"]
67    pub fn create_writable_with_options(
68        this: &FileSystemFileHandle,
69        options: &FileSystemCreateWritableOptions,
70    ) -> ::js_sys::Promise;
71    #[wasm_bindgen(method, js_class = "FileSystemFileHandle", js_name = "getFile")]
72    #[doc = "The `getFile()` method."]
73    #[doc = ""]
74    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/getFile)"]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `FileSystemFileHandle`*"]
77    pub fn get_file(this: &FileSystemFileHandle) -> ::js_sys::Promise;
78}