import { OSAdapter } from '../adapter.js'; import { PathInfo, PathSource, PathMetadata } from '../types.js'; import 'fs'; /** * Base adapter class that implements common functionality for all OS adapters */ declare abstract class BaseOSAdapter implements OSAdapter { protected pathMap: Map; /** * Add a path to the internal path map * * @param path Path to add * @param source Source information for the path */ protected _addPath(path: string, source: PathSource): void; /** * Enrich metadata with platform-specific information * Must be implemented by platform-specific adapters * * @param metadata Base metadata * @param path Path to enrich metadata for * @param source Source information * @returns Enriched metadata */ protected abstract _enrichMetadata(metadata: PathMetadata, path: string, source: PathSource): PathMetadata; /** * Evaluate a path to determine if it exists, is accessible, and assign a score * * @param path Path to evaluate * @returns Path info object with evaluation results */ protected evaluatePath(path: string): PathInfo; /** * Check if a path is an app storage path * * @param path Path to check * @returns True if the path is an app storage path */ protected isAppStoragePath(path: string): boolean; /** * Parse app name from a path * * @param path Path to parse * @returns Object containing app ID, name, bundle ID, and vendor */ protected parseAppName(path: string): { appId?: string; appName?: string; bundleId?: string; vendor?: string; }; /** * Format app name for display * * @param name Raw app name * @returns Formatted app name */ protected _formatAppName(name: string): string; /** * Find paths based on the provided search options * Must be implemented by platform-specific adapters * * @returns Promise resolving to array of path info objects */ abstract findPaths(): Promise; } export { BaseOSAdapter };