@reactionable/cli
Version:
23 lines (22 loc) • 1.18 kB
TypeScript
/// <reference types="node" />
import { CliService } from '../CliService';
import { FileDiffService } from './FileDiffService';
import { FileFactory } from './FileFactory';
import { FileService } from './FileService';
export declare class StdFile {
protected readonly cliService: CliService;
protected readonly fileService: FileService;
protected readonly fileDiffService: FileDiffService;
protected readonly fileFactory: FileFactory;
protected readonly file: string | null;
protected readonly encoding: BufferEncoding;
protected content: string;
constructor(cliService: CliService, fileService: FileService, fileDiffService: FileDiffService, fileFactory: FileFactory, file?: string | null, encoding?: BufferEncoding, content?: string);
protected setContent(content: string): this;
protected parseContent(content: string): string;
protected fixContentEOL(content: string): string;
getContent(): string;
replaceContent(search: RegExp, replacement: string): this;
appendContent(content: string, after?: string, onlyIfNotExists?: boolean): this;
saveFile(file?: string | null, encoding?: BufferEncoding): Promise<this>;
}