export type FileTestHelperConfig = { basePath?: string; maxRetries?: number; retryDelay?: number; }; export declare class FileTestHelper { private readonly basePath; private readonly filesToCleanup; private readonly fileGlobsToCleanup; private readonly maxRetries?; private readonly retryDelay?; constructor(config?: FileTestHelperConfig); fileExists(filePath: string): boolean; dirExists(dirPath: string): boolean; fileGlobExists(fileGlobPath: string): number; getFileTextContent(filePath: string): string; getFileGlobTextContent(fileGlobPath: string): string[]; deleteFile(filePath: string, { isPathAbsolute, maxRetries, retryDelay, }?: { isPathAbsolute?: boolean; maxRetries?: number; retryDelay?: number; }): void; deleteDir(dirPath: string, { isPathAbsolute, maxRetries, retryDelay, }?: { isPathAbsolute?: boolean; maxRetries?: number; retryDelay?: number; }): void; deleteFileGlob(fileGlobPath: string, { maxRetries, retryDelay, }?: { maxRetries?: number; retryDelay?: number; }): void; /** * Create file and (optionally) register it for later cleanup */ createFile(filePath: string, fileContent: any, { willBeCleanedUp, isPathAbsolute, }?: { willBeCleanedUp?: boolean; isPathAbsolute?: boolean; }): void; /** * Create directory and (optionally) register it for later cleanup */ createDir(dirPath: string, { willBeCleanedUp, isPathAbsolute, }?: { willBeCleanedUp?: boolean; isPathAbsolute?: boolean; }): void; /** * Add path to a file that should be deleted after calling cleanup command */ registerForCleanup(filePath: string, { isPathAbsolute, }?: { isPathAbsolute?: boolean; }): void; /** * Add glob path to a file that should be deleted after calling cleanup command */ registerGlobForCleanup(fileGlobPath: string): void; /** * Delete all files that were created by this helper or explicitly added to cleanup list */ cleanup(): void; }