antlr-ng
Version:
Next generation ANTLR Tool
33 lines (32 loc) • 1.55 kB
TypeScript
import type { IFs } from "memfs";
export declare const basename: (path: string, ext?: string) => string;
export declare const dirname: (path: string) => string;
/**
* Copies the entire folder from the physical file system to the virtual one.
*
* @param fs The target file system.
* @param source The source folder in the physical file system.
* @param target The target folder in the virtual file system.
* @param recursive If true, the copy operation is done recursively.
* @param filter An optional filter to apply to the file names to copy.
*/
export declare const copyFolderToMemFs: (fs: IFs, source: string, target: string, recursive: boolean, filter?: RegExp) => void;
/**
* Copies the entire folder from the virtual filesystem to physical file one.
*
* @param fs The source file system.
* @param source The source folder in the physical file system.
* @param target The target folder in the virtual file system.
* @param recursive If true, the copy operation is done recursively.
* @param filter An optional filter to apply to the file names to copy.
*/
export declare const copyFolderFromMemFs: (fs: IFs, source: string, target: string, recursive: boolean, filter?: RegExp) => void;
/**
* Generates a randome file name with the given prefix and length.
*
* @param prefix A string to use as the prefix of the result file name.
* @param length The length of the random part of the file name.
*
* @returns A random file name.
*/
export declare const generateRandomFilename: (prefix: string, length?: number) => string;