-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9faa10d
commit f56afb3
Showing
17 changed files
with
240 additions
and
511 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,5 @@ | |
"lib": ["es2019", "dom"], | ||
"outDir": "./types/" | ||
}, | ||
"include": ["src/*.js"] | ||
"include": ["mod.js"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./src/es6.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export default FileSystemDirectoryHandle; | ||
export class FileSystemDirectoryHandle extends FileSystemHandle { | ||
constructor(adapter: any); | ||
getDirectoryHandle(name: string, options?: { | ||
create?: boolean; | ||
}): Promise<FileSystemDirectoryHandle>; | ||
entries(): AsyncGenerator<[string, FileSystemHandle | FileSystemDirectoryHandle]>; | ||
getEntries(): AsyncGenerator<import("./FileSystemFileHandle.js").default | FileSystemDirectoryHandle, void, unknown>; | ||
getFileHandle(name: string, options?: { | ||
create?: boolean; | ||
}): Promise<import("./FileSystemFileHandle.js").default>; | ||
removeEntry(name: string, options?: { | ||
recursive?: boolean; | ||
}): Promise<any>; | ||
resolve(possibleDescendant: any): Promise<any[]>; | ||
keys(): AsyncGenerator<any, void, unknown>; | ||
values(): AsyncGenerator<FileSystemHandle | FileSystemDirectoryHandle, void, unknown>; | ||
[kAdapter]: any; | ||
[Symbol.asyncIterator](): AsyncGenerator<[string, FileSystemHandle | FileSystemDirectoryHandle], any, any>; | ||
} | ||
import FileSystemHandle from "./FileSystemHandle.js"; | ||
declare const kAdapter: unique symbol; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default FileSystemFileHandle; | ||
export class FileSystemFileHandle extends FileSystemHandle { | ||
constructor(adapter: any); | ||
createWritable(options?: { | ||
keepExistingData?: boolean; | ||
}): Promise<FileSystemWritableFileStream>; | ||
getFile(): Promise<File>; | ||
[kAdapter]: any; | ||
} | ||
import FileSystemHandle from "./FileSystemHandle.js"; | ||
import FileSystemWritableFileStream from "./FileSystemWritableFileStream.js"; | ||
declare const kAdapter: unique symbol; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export default FileSystemHandle; | ||
export class FileSystemHandle { | ||
constructor(adapter: FileSystemHandle & { | ||
writable; | ||
}); | ||
name: string; | ||
kind: ('file' | 'directory'); | ||
queryPermission({ mode }?: { | ||
mode?: string; | ||
}): Promise<any>; | ||
requestPermission({ mode }?: { | ||
mode?: string; | ||
}): Promise<any>; | ||
remove(options?: { | ||
recursive?: boolean; | ||
}): Promise<void>; | ||
isSameEntry(other: FileSystemHandle): Promise<any>; | ||
[kAdapter]: any; | ||
} | ||
declare const kAdapter: unique symbol; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default FileSystemWritableFileStream; | ||
export class FileSystemWritableFileStream extends WritableStream<any> { | ||
constructor(...args: any[]); | ||
private _closed; | ||
seek(position: number): Promise<void>; | ||
truncate(size: number): Promise<void>; | ||
write(data: any): Promise<void>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export class FileHandle { | ||
constructor(name?: string); | ||
name: string; | ||
kind: string; | ||
getFile(): Promise<void>; | ||
isSameEntry(other: any): Promise<boolean>; | ||
createWritable(options?: object): Promise<WritableStreamDefaultWriter<any>>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
export class Sink { | ||
constructor(fileHandle: FileHandle, file: File); | ||
fileHandle: FileHandle; | ||
file: File; | ||
size: number; | ||
position: number; | ||
write(chunk: any): void; | ||
close(): void; | ||
} | ||
export class FileHandle { | ||
constructor(name?: string, file?: File, writable?: boolean); | ||
_file: File; | ||
name: string; | ||
kind: string; | ||
_deleted: boolean; | ||
writable: boolean; | ||
readable: boolean; | ||
getFile(): Promise<File>; | ||
createWritable(opts: any): Promise<Sink>; | ||
isSameEntry(other: any): Promise<boolean>; | ||
_destroy(): Promise<void>; | ||
} | ||
export class FolderHandle { | ||
constructor(name: string, writable?: boolean); | ||
name: string; | ||
kind: string; | ||
_deleted: boolean; | ||
_entries: { | ||
[x: string]: (FolderHandle | FileHandle); | ||
}; | ||
writable: boolean; | ||
readable: boolean; | ||
entries(): AsyncGenerator<[string, FileHandle | FolderHandle]>; | ||
isSameEntry(other: any): Promise<boolean>; | ||
getDirectoryHandle(name: string, opts: { | ||
create: boolean; | ||
}): Promise<FolderHandle>; | ||
getFileHandle(name: string, opts: { | ||
create: boolean; | ||
}): Promise<FileHandle>; | ||
removeEntry(name: any, opts: any): Promise<void>; | ||
_destroy(recursive: any): Promise<void>; | ||
} | ||
declare function _default(): FolderHandle; | ||
export default _default; | ||
declare const File_1: typeof window.File; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
export class FileHandle { | ||
constructor(file: FileEntry, writable?: boolean); | ||
file: FileEntry; | ||
kind: string; | ||
writable: boolean; | ||
readable: boolean; | ||
get name(): string; | ||
isSameEntry(other: any): boolean; | ||
getFile(): Promise<File>; | ||
createWritable(opts: any): Promise<Sink>; | ||
} | ||
export class FolderHandle { | ||
constructor(dir: DirectoryEntry, writable?: boolean); | ||
dir: DirectoryEntry; | ||
writable: boolean; | ||
readable: boolean; | ||
kind: string; | ||
name: string; | ||
isSameEntry(other: FolderHandle): boolean; | ||
entries(): AsyncGenerator<[string, FileHandle | FolderHandle]>; | ||
getDirectoryHandle(name: string, opts: { | ||
create: boolean; | ||
}): Promise<FolderHandle>; | ||
getFileHandle(name: string, opts: { | ||
create: boolean; | ||
}): Promise<FileHandle>; | ||
removeEntry(name: string, opts: { | ||
recursive: boolean; | ||
}): Promise<any>; | ||
} | ||
declare function _default(opts?: {}): Promise<any>; | ||
export default _default; | ||
declare class Sink { | ||
constructor(writer: FileWriter, fileEntry: FileEntry); | ||
writer: FileWriter; | ||
fileEntry: FileEntry; | ||
write(chunk: BlobPart | any): Promise<any>; | ||
close(): Promise<any>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import FileSystemDirectoryHandle from "./FileSystemDirectoryHandle.js"; | ||
import FileSystemFileHandle from "./FileSystemFileHandle.js"; | ||
import FileSystemHandle from "./FileSystemHandle.js"; | ||
import FileSystemWritableFileStream from "./FileSystemWritableFileStream.js"; | ||
import getOriginPrivateDirectory from "./getOriginPrivateDirectory.js"; | ||
import showDirectoryPicker from "./showDirectoryPicker.js"; | ||
import showOpenFilePicker from "./showOpenFilePicker.js"; | ||
import showSaveFilePicker from "./showSaveFilePicker.js"; | ||
export { FileSystemDirectoryHandle, FileSystemFileHandle, FileSystemHandle, FileSystemWritableFileStream, getOriginPrivateDirectory, showDirectoryPicker, showOpenFilePicker, showSaveFilePicker }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default getOriginPrivateDirectory; | ||
export type FileSystemDirectoryHandle = import('./FileSystemDirectoryHandle.js').default; | ||
declare function getOriginPrivateDirectory(driver?: object | undefined, options?: {}): Promise<import("./FileSystemDirectoryHandle.js").default>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default showDirectoryPicker; | ||
export type FileSystemDirectoryHandle = import('./FileSystemDirectoryHandle.js').default; | ||
export function showDirectoryPicker(options?: { | ||
_preferPolyfill?: boolean; | ||
}): Promise<FileSystemDirectoryHandle>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default showOpenFilePicker; | ||
export type FileSystemFileHandle = import('./FileSystemFileHandle.js').default; | ||
export function showOpenFilePicker(options?: { | ||
multiple?: boolean; | ||
excludeAcceptAllOption?: boolean; | ||
accepts?: any[]; | ||
_preferPolyfill?: boolean; | ||
}): Promise<FileSystemFileHandle[]>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default showSaveFilePicker; | ||
export type FileSystemFileHandle = import('./FileSystemFileHandle.js').default; | ||
export function showSaveFilePicker(options?: { | ||
excludeAcceptAllOption?: boolean; | ||
accepts?: any[]; | ||
suggestedName?: string; | ||
_name?: string; | ||
_preferPolyfill?: boolean; | ||
}): Promise<import("./FileSystemFileHandle.js").default>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export function fromDataTransfer(entries: any): Promise<import("./FileSystemDirectoryHandle.js").default>; | ||
export function getDirHandlesFromInput(input: any): Promise<import("./FileSystemDirectoryHandle.js").default>; | ||
export function getFileHandlesFromInput(input: any): Promise<import("./FileSystemFileHandle.js").default[]>; | ||
export namespace errors { | ||
const INVALID: string[]; | ||
const GONE: string[]; | ||
const MISMATCH: string[]; | ||
const MOD_ERR: string[]; | ||
function SYNTAX(m: any): string[]; | ||
const SECURITY: string[]; | ||
const DISALLOWED: string[]; | ||
} | ||
export namespace config { | ||
const writable: { | ||
new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>; | ||
prototype: WritableStream<any>; | ||
}; | ||
} |