/** * File Organizer MCP Server v3.4.2 * File Scanner Service */ import type { FileInfo, FileWithSize, ScanOptions } from "../types.js"; /** * File Scanner Service - core scanning logic */ export declare class FileScannerService { private readonly maxFiles; private readonly maxDepth; constructor(maxFiles?: number, maxDepth?: number); /** * Scan directory for files with full metadata * @param directory - Directory path to scan * @param options - Scan options including includeSubdirs and maxDepth * @throws ValidationError if maxDepth is invalid (must be -1 or 0-50) */ scanDirectory(directory: string, options?: ScanOptions): Promise; /** * Get all files with basic info (name, path, size) */ getAllFiles(directory: string, includeSubdirs?: boolean, maxDepth?: number): Promise; /** * Recursively scan directory contents * @param dir - Directory path to scan * @param results - Array to accumulate file information * @param includeSubdirs - Whether to include subdirectories in scan * @param maxDepth - Maximum recursion depth (-1 for unlimited) * @param currentDepth - Current recursion depth (internal use) * @param visited - Set of resolved real paths to prevent circular symlink traversal * @example * ```ts * const results: FileInfo[] = []; * await scanner.scanDir( * '/path/to/scan', * results, * true, * 5, * 0, * new Set() * ); * // Note: visited Set is updated during scan to detect cycles * ``` * @returns Promise */ private scanDir; } //# sourceMappingURL=file-scanner.service.d.ts.map