ThumbnailContentAccess
Since Plugin API: 2.0.0
Signature
interface ThumbnailContentAccess { openSnapshot(path?: string): Promise<ThumbnailContentSnapshot>; readTextPrefix(path?: string, limit?: number): Promise<string>; readBinaryPrefix(path?: string, limit?: number): Promise<Uint8Array>; readText(path?: string): Promise<PluginTextFileSnapshot>; readBinary(path?: string): Promise<PluginBinaryFileSnapshot>; readDirectory(path?: string): Promise<PluginDirectoryReadResult>; selectDirectory(path: string, selection: ThumbnailDirectorySelection): Promise<string | null>; declareInput(input: ThumbnailInputDeclaration): Promise<void>;}Members
| Name | Type | Required | Description |
|---|---|---|---|
openSnapshot |
(path?: string) => Promise<ThumbnailContentSnapshot> |
yes | Grant a revision-pinned source without loading the complete File. |
readTextPrefix |
(path?: string, limit?: number) => Promise<string> |
yes | Bounded UTF-8 display prefix, tracked against the captured source revision. |
readBinaryPrefix |
(path?: string, limit?: number) => Promise<Uint8Array> |
yes | Raw source-bound prefix; at most256KiB, without whole-File snapshot assembly. |
readText |
(path?: string) => Promise<PluginTextFileSnapshot> |
yes | - |
readBinary |
(path?: string) => Promise<PluginBinaryFileSnapshot> |
yes | - |
readDirectory |
(path?: string) => Promise<PluginDirectoryReadResult> |
yes | - |
selectDirectory |
(path: string, selection: ThumbnailDirectorySelection) => Promise<string | null> |
yes | Host reruns this bounded, deterministic selection, including successful absence. |
declareInput |
(input: ThumbnailInputDeclaration) => Promise<void> |
yes | Additional ambient inputs must be declared in a form the Host can validate. |