import { Log } from '@spinajs/log-common'; import { WriteStream } from 'fs'; import { PassThrough } from 'stream'; import { fs, IFsTempOptions, IFsUploadOptions, IStat, IWriteStreamOptions, IZipResult } from './interfaces.js'; import { TempCleanupStrategy } from './temp-cleanup-strategy.js'; /** * Temp filesystem. Use it for creating and storing temporary files and dirs. * * It is a wrapper over any other registered fs provider - all file operations are * delegated to backend fs selected by `provider` option, so temp files can live * on local disk, s3, ftp etc. Backend must be a registered fs provider - creation * fails otherwise. * * Old files are automatically deleted by configured TempCleanupStrategy * ( default: first level files older than `maxFileAge` seconds ). */ export declare class fsTemp extends fs { Options: IFsTempOptions; protected Logger: Log; /** * Backend filesystem holding temp files. Registered and disposed * independently - this wrapper does not own it. */ protected Provider: fs; /** * Cleanup policy, selectable via `cleanupStrategy` option. * Owns its own schedule ( interval, cron, ... ) via start / stop. */ protected CleanupStrategy: TempCleanupStrategy; get Name(): string; constructor(Options: IFsTempOptions); resolve(): Promise; dispose(): Promise; get BasePath(): string | undefined; protected doDownload(path: string): Promise; protected doUpload(srcPath: string, destPath: string, options?: IFsUploadOptions): Promise; protected doHash(path: string, algo?: string): Promise; protected doMetadata(path: string): Promise; resolvePath(path: string): string; protected doRead(path: string, encoding?: BufferEncoding): Promise; protected doReadStream(path: string, encoding?: BufferEncoding): Promise; protected doWrite(path: string, data: string | Uint8Array, encoding?: BufferEncoding): Promise; protected doWriteStream(path: string, readStream: NodeJS.ReadableStream | undefined, options: IWriteStreamOptions): Promise; protected doExists(path: string): Promise; protected doDirExists(path: string): Promise; protected doCopy(path: string, dest: string, dstFs?: fs): Promise; protected doMove(oldPath: string, newPath: string, dstFs?: fs): Promise; protected doRename(oldPath: string, newPath: string): Promise; protected doRm(path: string): Promise; protected doMkdir(path: string): Promise; protected doStat(path: string): Promise; protected doList(path: string): Promise; protected doHasEntries(path: string): Promise; tmppath(ext?: string): string; protected doAppend(path: string, data: string | Uint8Array, encoding?: BufferEncoding): Promise; protected doZip(path: string | (string | string[])[], dstFs: fs, dstFile: string): Promise; protected doUnzip(srcPath: string, destPath: string, dstFs: fs): Promise; protected doIsDir(path: string): Promise; } //# sourceMappingURL=temp-provider.d.ts.map