legal-markdown-js
Version:
Node.js implementation of LegalMarkdown for processing legal documents with markdown and YAML - Complete feature parity with Ruby version
42 lines • 1.75 kB
TypeScript
/**
* File scanning utilities for Interactive CLI
*
* This module provides functionality for discovering and categorizing files
* within the file system, focusing on supported document formats for
* Legal Markdown processing.
*/
import { FileItem } from '../types';
/**
* Recursively scan directory for supported files
*
* Performs a comprehensive directory traversal to discover all files
* with supported extensions, returning them as structured FileItem objects
* suitable for interactive selection menus.
*
* @param dirPath Absolute path to the directory to scan
* @param baseDir Optional base directory for calculating relative paths. If not provided, uses process.cwd()
* @returns Array of FileItem objects representing discovered files and directories
*/
export declare function scanDirectory(dirPath: string, baseDir?: string): FileItem[];
/**
* Scan for CSS files in styles directory, excluding highlight.css
*
* Discovers available CSS stylesheets for HTML/PDF output styling,
* automatically excluding the reserved highlight.css file which is
* used internally for field highlighting functionality.
*
* @param stylesDir Absolute path to the styles directory to scan
* @returns Array of CSS filenames available for user selection
*/
export declare function scanCssFiles(stylesDir: string): string[];
/**
* Check if a file exists and is readable
*
* Validates that a given file path points to an accessible file,
* useful for confirming file selections before processing.
*
* @param filePath Absolute path to the file to validate
* @returns True if file exists and is accessible, false otherwise
*/
export declare function isValidFile(filePath: string): boolean;
//# sourceMappingURL=file-scanner.d.ts.map