@daysnap/horn-jssdk
Version:
原生容器面向 H5 开发者提供的基于容器应用内的网页开发工具包
19 lines (18 loc) • 632 B
TypeScript
import { type FailCallbackResult, type PickOptions } from '../../core';
export interface GetFileInfoResult {
filePath: string;
size: number;
width: number;
height: number;
duration: number;
}
export interface GetFileInfoOptions {
filePath: string;
fileType: 'image' | 'video' | 'other';
success?: (result: GetFileInfoResult) => void;
fail?: (err: FailCallbackResult) => void;
}
/**
* 获取本地文件信息
*/
export declare const getFileInfo: <T extends GetFileInfoOptions = GetFileInfoOptions>(options: T) => import("../../core").PromisifySuccessResult<PickOptions<T>, GetFileInfoOptions>;