/** * @fileoverview File system utilities for security scanning * @module @nahisaho/musubix-security/infrastructure/file-scanner * @trace REQ-SEC-SCAN-004 */ /** * File information */ export interface FileInfo { /** Absolute file path */ path: string; /** Relative path from root */ relativePath: string; /** File size in bytes */ size: number; /** File extension */ extension: string; /** Last modified time */ modifiedAt: Date; } /** * File scanner options */ export interface FileScannerOptions { /** File extensions to include */ extensions?: string[]; /** Glob patterns to exclude */ excludePatterns?: string[]; /** Maximum file size in bytes */ maxFileSize?: number; /** Maximum depth to scan */ maxDepth?: number; /** Follow symbolic links */ followSymlinks?: boolean; } /** * Default exclude patterns */ export declare const DEFAULT_EXCLUDE_PATTERNS: string[]; /** * Default scannable extensions */ export declare const DEFAULT_EXTENSIONS: string[]; /** * File scanner for collecting files to analyze */ export declare class FileScanner { private options; constructor(options?: FileScannerOptions); /** * Scan a directory for files */ scan(rootPath: string): Promise; /** * Recursively scan a directory */ private scanDirectory; /** * Get file information */ private getFileInfo; /** * Check if a path should be excluded */ private isExcluded; /** * Check if a file should be included */ private shouldInclude; /** * Read file content */ readFile(filePath: string): Promise; /** * Read file content with error handling */ readFileSafe(filePath: string): Promise; /** * Check if a file exists and is readable */ isReadable(filePath: string): Promise; /** * Get file stats */ getStats(filePath: string): Promise<{ size: number; modifiedAt: Date; } | null>; } /** * Create a file scanner with custom options */ export declare function createFileScanner(options?: FileScannerOptions): FileScanner; //# sourceMappingURL=file-scanner.d.ts.map