UNPKG

next-flow-interface

Version:

Interface package for NEXT FlOW. You can use this package to build your own plugin that can control anything.

31 lines 1.21 kB
export declare function to3n(bn: number): string; export declare function convertBytesToHigherUnit(bn: number): string; export declare function splitName(name: string): [string, string]; export declare function ensureFileArray(files: File | File[] | FileList | null | undefined): File[]; export declare function chunkHash(file: File): Promise<string>; /** * 判断两个文件是否相同 * * @param file 目标文件 * @param name 另一个文件的名称 * @param size 另一个文件的大小 * @param hash 另一个文件的哈希 (可选) (通过上方 chunkHash 函数计算得出) * * @returns 是否相同 */ export declare function isSameFile(file: File, name: string, size: number, hash?: string): Promise<boolean>; export declare function getFileInfo(url: string): Promise<{ name: string; size: number; }>; declare const FileUtils: { to3n: typeof to3n; convertBytesToHigherUnit: typeof convertBytesToHigherUnit; splitName: typeof splitName; ensureFileArray: typeof ensureFileArray; chunkHash: typeof chunkHash; isSameFile: typeof isSameFile; getFileInfo: typeof getFileInfo; }; export default FileUtils; //# sourceMappingURL=file-utils.d.ts.map