tree-cli-tool
Version:
A powerful command-line tool to display directory tree structure with various configuration options and output formats
25 lines • 978 B
TypeScript
import { FileNode, TreeStats, TreeOptions } from './types';
export declare abstract class BaseFormatter {
protected options: TreeOptions;
constructor(options: TreeOptions);
abstract format(tree: FileNode, stats: TreeStats): string;
protected formatSize(size: number): string;
protected formatDate(date: Date): string;
}
export declare class TextFormatter extends BaseFormatter {
private static readonly TREE_SYMBOLS;
format(tree: FileNode, stats: TreeStats): string;
private formatChildren;
private formatNode;
private formatStats;
}
export declare class JsonFormatter extends BaseFormatter {
format(tree: FileNode, stats: TreeStats): string;
private nodeToJson;
}
export declare class MarkdownFormatter extends BaseFormatter {
format(tree: FileNode, stats: TreeStats): string;
private formatChildren;
}
export declare function createFormatter(options: TreeOptions): BaseFormatter;
//# sourceMappingURL=formatters.d.ts.map