@dpkit/file
Version:
Fast TypeScript data management framework built on top of the Data Package standard and Polars DataFrames
10 lines (9 loc) • 401 B
TypeScript
export type HashType = "md5" | "sha1" | "sha256" | "sha512";
export declare function inferFileHash(path: string, options?: {
hashType?: HashType;
}): Promise<string>;
export declare function inferFileBytes(path: string): Promise<number>;
export declare function inferFileEncoding(path: string, options?: {
sampleBytes?: number;
confidencePercent?: number;
}): Promise<string | undefined>;