autopv-cli
Version:
AutoPrivacy DSAR evidence-pack generator - Automated GDPR compliance for SaaS companies
41 lines (40 loc) • 1.08 kB
TypeScript
/**
* File Cleanup Utility
* Manages automatic cleanup of old evidence files (>24h) on CLI startup
*/
export interface CleanupResult {
filesScanned: number;
filesDeleted: number;
deletedFiles: string[];
totalSizeFreed: number;
errors: string[];
}
export declare class FileCleanup {
private readonly targetDir;
private readonly maxAgeHours;
constructor(targetDir?: string, maxAgeHours?: number);
/**
* Clean up old evidence files based on age
*/
cleanupOldFiles(): CleanupResult;
/**
* Generate cleanup report
*/
generateCleanupReport(result: CleanupResult): string;
/**
* Format bytes to human readable format
*/
private formatBytes;
/**
* List evidence files in directory with age information
*/
listEvidenceFiles(): Array<{
file: string;
age: string;
size: string;
}>;
}
/**
* Convenience function for cleanup with default settings
*/
export declare function cleanupOldEvidenceFiles(targetDir?: string, maxAgeHours?: number): CleanupResult;