-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfilesystem.d.ts
More file actions
30 lines (25 loc) · 853 Bytes
/
filesystem.d.ts
File metadata and controls
30 lines (25 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
export {};
declare global {
interface FileSystemHandle {
kind: 'file' | 'directory';
name: string;
}
interface FileSystemFileHandle extends FileSystemHandle {
kind: 'file';
getFile(): Promise<File>;
createWritable(): Promise<FileSystemWritableFileStream>;
}
interface FileSystemDirectoryHandle extends FileSystemHandle {
kind: 'directory';
entries(): AsyncIterableIterator<[string, FileSystemHandle]>;
getFileHandle(name: string, options?: { create?: boolean }): Promise<FileSystemFileHandle>;
removeEntry(name: string, options?: { recursive?: boolean }): Promise<void>;
}
interface FileSystemWritableFileStream {
write(data: BufferSource | Blob | string): Promise<void>;
close(): Promise<void>;
}
interface Window {
showDirectoryPicker(): Promise<FileSystemDirectoryHandle>;
}
}