export declare function writeToFile(name: string, contents: () => string[], logDepth?: number): void; export interface DirectorySpec { main: string; backup: string; } export declare const copyFiles: (toRoot: string, fromRoot: string, directorySpec?: DirectorySpec) => (...names: string[]) => void; export declare function copyFile(name: string, from: string, directorySpec?: DirectorySpec): void; export declare function loadFile(inputName: string, directorySpec?: DirectorySpec): string; export declare function templateFile(name: string, inputName: string, template: any, directorySpec?: DirectorySpec, logDepth?: number): void; export interface GetFileResult { isDir: boolean; path: string; file: string; } /** * serach files and directories recursively. * Option: you can limit search path depth. * @param {string} targetpath search base path * @param {number} depth recursive depth. default = no depth limit * @returns list of { path:absolute path, file: name, isDir:is directory } of files and dirs in targetpath */ export declare const GetFilelistRecursively2: (targetpath: string, depth?: number) => GetFileResult[]; /** * Recursively copies folders and files under the specified path with the same structure. * If the destination directory does not exist, a folder will be created and copied into it. * In case of insufficient permissions or insufficient capacity, it will detect an exception and stop. * @param {string} srcpath copy from the path * @param {string} destpath copy to the path */ export declare const CopyFilesRecursively: (srcpath: string, destpath: string, depth?: number) => void;