/** * Format a file size in bytes to a human-readable string * * Converts bytes to the appropriate unit (Bytes, KB, MB, GB) * with proper rounding to 2 decimal places. * * @param bytes - The file size in bytes * @returns Formatted string with appropriate unit * * @example * formatFileSize(1024) // "1 KB" * formatFileSize(1536) // "1.5 KB" * formatFileSize(1048576) // "1 MB" * formatFileSize(0) // "0 Bytes" */ export declare const formatFileSize: (bytes: number) => string; /** * Convert file size from one unit to another * * @param value - The numeric value to convert * @param fromUnit - Source unit (bytes, kb, mb, gb, tb) * @param toUnit - Target unit (bytes, kb, mb, gb, tb) * @returns Converted value * * @example * convertFileSize(1, "mb", "kb") // 1024 * convertFileSize(1024, "kb", "mb") // 1 */ export declare const convertFileSize: (value: number, fromUnit: "bytes" | "kb" | "mb" | "gb" | "tb", toUnit: "bytes" | "kb" | "mb" | "gb" | "tb") => number; /** * Parse a human-readable file size string back to bytes * * @param sizeString - String like "1.5 KB", "2 MB", etc. * @returns Size in bytes, or null if parsing fails * * @example * parseFileSize("1.5 KB") // 1536 * parseFileSize("2 MB") // 2097152 * parseFileSize("invalid") // null */ export declare const parseFileSize: (sizeString: string) => number | null; //# sourceMappingURL=formatFileSize.d.ts.map