๐ฅ @bridge/import
Module that allows access to bridge.'s import system and register import handlers. View Source Code
js
import { ... } from '@bridge/import'
โก Functions
addFolderImporter
TODO
- Signature:
addFolderImporter(handle: IFolderHandler)
- Returns:
Promise<void> <-IDK if this is correct
js
//TODO
await addFolderImporter()
importHandle
TODO
- Signature:
importHandle(handle: AnyHandle)
- Returns:
Promise<void>
js
//TODO
await importHandle()
registerOpenWithHandler
The registerOpenWithHandler
function registers/adds a new handler in the Open With popup when you drag and drop a file onto bridge.
- Signatue:
registerOpenWithHandler(handler: IPluginOpenWithAction)
- Returns:
IDisposable
js
//TODO
registerOpenWithHandler()
๐ Interfaces
AnyHandle
ts
export type AnyHandle =
| FileSystemFileHandle
| FileSystemDirectoryHandle
| VirtualHandle
IPluginOpenWithAction
ts
export interface IPluginOpenWithAction {
icon: string
name: string
isAvailable?: (details: IOpenWithDetails) => Promise<boolean> | boolean
onOpen: (details: IOpenWithDetails) => Promise<void> | void
}
IFolderHandler
ts
export interface IFolderHandler {
icon: string
name: string
description: string
onSelect: (directoryHandle: AnyDirectoryHandle) => Promise<void> | void
}