export interface SourceFile { cwd: string; filename: string; } export interface SourceString { data: string; } export type Source = SourceFile | SourceString; export interface SourceData { data: string; filename?: string; } export declare function getSource(source: Source): Promise; export declare function writeFile(filename: string, data: string): Promise; export declare function relFile(from: string | undefined, to: string): string; export declare function glob(globs: Array, cwd: string, hidden?: boolean): Promise; export declare function ensureAbsolute(filename: string, cwd: string): string; /** * Find the deepest common directory of a set of files. */ export declare function getRootFolderOfFiles(files: Array, cwd: string): string; /** * Get the common "root" directory of files, their relative path to this * directory, and their relative path to new root directory. */ export declare function reRootFiles(files: Array, cwd: string, newRoot?: string): { root: string; newRoot: string; files: Array<{ in: string; out: string; rel: string; }>; }; export declare function prettyFile(filename: string, cwd: string): string;