hyperdb-wasm 0.0.26862-dev.wasm.g8c0876f6 → 0.0.26979-dev.wasm.g78ca8a1b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,8 @@
1
1
  import type { ExternalDirectoryBackend } from './wasm_bindings.js';
2
+ export type BrowserDirectoryEntry = {
3
+ readonly name: string;
4
+ readonly kind: 'file' | 'directory';
5
+ };
2
6
  export declare class BrowserExternalDirectoryBackend implements ExternalDirectoryBackend {
3
7
  private readonly directories;
4
8
  private readonly paths;
@@ -11,6 +15,14 @@ export declare class BrowserExternalDirectoryBackend implements ExternalDirector
11
15
  registered(path: string, locator: string): void;
12
16
  removed(pathOrLocator: string): void;
13
17
  list(locator: string): Promise<readonly string[]>;
18
+ listEntries(locator: string, path: string): Promise<readonly BrowserDirectoryEntry[]>;
19
+ lookup(locator: string, path: string): Promise<{
20
+ readonly kind: 'directory';
21
+ } | {
22
+ readonly kind: 'file';
23
+ readonly locator: string;
24
+ readonly size: number;
25
+ } | undefined>;
14
26
  open(locator: string, path: string): Promise<{
15
27
  readonly locator: string;
16
28
  readonly size: number;
@@ -24,6 +36,7 @@ export declare class BrowserExternalDirectoryBackend implements ExternalDirector
24
36
  shutdown(): void;
25
37
  private getDirectory;
26
38
  private getWritableDirectory;
39
+ private openDirectory;
27
40
  private getOpenWriter;
28
41
  private cleanupWriter;
29
42
  private enqueue;