@viewdo/dxp-story-cli
Version:
DXP Story Management CLI
29 lines (28 loc) • 1.07 kB
TypeScript
import { ConsoleService } from './ConsoleService';
export declare class FileService {
private console;
constructor(console: ConsoleService);
exists(file_path: string): boolean;
read(file_path: string): string;
hasContent(file_path: string): boolean;
ensure(file_path: string): void;
rename(file_path: string, new_file_path: string): void;
write(file_path: string, content?: string): void;
listFiles(file_path: string): string[];
listDirectories(dirPath: string): string[];
copyFile(source: string, target: string, overwrite: boolean): void;
syncDirectories(source: string, target: string, overwrite: boolean): void;
delete(file_path: string): void;
removeDir(file_path: string): Promise<any>;
_getFullPath(file_path: string): string;
_clear(): void;
getFilesInDirectory(dir: string, baseDir?: string): {
file: string;
path: string;
}[];
parseKeyToPathAndFile(key: string): {
file: string;
path: string;
};
formatHtml(content: string): Promise<any>;
}