import * as fs from 'node:fs'; /** * This module exists to isolate filesystem operations from the rest of the codebase. * This makes testing easier by avoiding direct fs mocking in jest configuration. * * Additionally, abstracting storage operations allows for future flexibility - * this export utility may need to work with storage systems other than the local filesystem * (e.g. S3, Google Cloud Storage, etc). */ export interface Utility { exists: (path: string) => Promise; isDirectory: (path: string) => Promise; isFile: (path: string) => Promise; isReadable: (path: string) => Promise; isWritable: (path: string) => Promise; isFileReadable: (path: string) => Promise; isDirectoryWritable: (path: string) => Promise; isDirectoryReadable: (path: string) => Promise; createDirectory: (path: string) => Promise; readFile: (path: string, encoding: string) => Promise; readStream: (path: string) => Promise; writeFile: (path: string, data: string | Buffer, encoding: string) => Promise; forEachFileIn: (directory: string, callback: (path: string) => Promise, options?: { pattern: string; limit?: number; concurrency?: number; }) => Promise; hashFile: (path: string, length: number) => Promise; listFiles: (directory: string) => Promise; } export declare const create: (params: { log?: (message: string, ...args: any[]) => void; }) => Utility;