-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
45 lines (41 loc) · 1.03 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* Options for file validation
*/
export interface ValidateFileOptions {
maxSizeInBytes?: number;
}
/**
* Validation result object
*/
export interface ValidationResult {
status: boolean;
message: string;
}
/**
* Validates a file with optional configuration
* @param filePath - Path to the file to validate
* @param options - Optional configuration object
* @returns Promise resolving to validation result
*/
export function validateFile(
filePath: string,
options?: ValidateFileOptions
): Promise<ValidationResult>;
/**
* Validates file content
* @param filePath - Path to the file to validate
* @returns Promise resolving to validation result
*/
export function validateFileContent(
filePath: string
): Promise<ValidationResult>;
/**
* Checks file signature against known signatures
* @param buffer - File buffer to check
* @param signatures - Array of valid signatures
* @returns Boolean indicating if signature matches
*/
export function checkFileSignature(
buffer: Buffer,
signatures: number[][]
): boolean;