/** * @file * * Mock of Obsidian's `CapacitorAdapter`, the mobile vault data adapter, backed by an in-memory filesystem. */ import type { CapacitorAdapter as CapacitorAdapterOriginal } from 'obsidian'; import { InMemoryAdapter } from '../internal/in-memory-adapter.mjs'; /** * Mock of Obsidian's `CapacitorAdapter`, the `DataAdapter` Obsidian uses on mobile. * * All file operations come from the shared in-memory filesystem; nothing touches the real disk. */ export declare class CapacitorAdapter extends InMemoryAdapter { /** * Creates an adapter rooted at a base path. * * @param basePath - The vault's base path, used to build full paths. * @param fs - The Capacitor filesystem handle; only forwarded to the construction hook. */ protected constructor(basePath: string, fs: unknown); /** * Mock-only factory: creates an adapter, spyable via `vi.spyOn(CapacitorAdapter, 'create__')`. * * @param basePath - The vault's base path. * @param fs - The Capacitor filesystem handle; unused by the mock. * @returns The new adapter. */ static create__(basePath: string, fs: unknown): CapacitorAdapter; /** * Mock-only: views a value typed as Obsidian's `CapacitorAdapter` as this mock. * * @param value - The value typed as the original `CapacitorAdapter`. * @returns The same object, typed as the mock. */ static fromOriginalType__(value: CapacitorAdapterOriginal): CapacitorAdapter; /** * Mock-only: views this mock as Obsidian's `CapacitorAdapter` type. * * @returns The same object, typed as the original `CapacitorAdapter`. */ asOriginalType__(): CapacitorAdapterOriginal; /** * Mock-only construction hook, called at the end of the constructor; a no-op meant for * `vi.spyOn(CapacitorAdapter.prototype, 'constructor__')`. * * @param _basePath - The base path the adapter was created with. * @param _fs - The filesystem handle the adapter was created with. */ constructor__(_basePath: string, _fs: unknown): void; /** * Resolves a vault path to a full path on the device. * * @param normalizedPath - The normalized vault-relative path. * @returns The base path and the vault path joined with `/`. */ getFullPath(normalizedPath: string): string; }