react-native-executorch
Version:
An easy way to run AI models in React Native with ExecuTorch
25 lines • 1.22 kB
TypeScript
import { ResourceSource } from '../types/common';
import { DownloadResource } from './ResourceFetcherUtils';
export declare class ResourceFetcher {
static downloads: Map<ResourceSource, DownloadResource>;
static fetch(callback?: (downloadProgress: number) => void, ...sources: ResourceSource[]): Promise<string[] | null>;
private static singleFetch;
private static returnOrStartNext;
private static pause;
private static resume;
private static cancel;
static pauseFetching(...sources: ResourceSource[]): Promise<void>;
static resumeFetching(...sources: ResourceSource[]): Promise<void>;
static cancelFetching(...sources: ResourceSource[]): Promise<void>;
private static findActive;
static listDownloadedFiles(): Promise<string[]>;
static listDownloadedModels(): Promise<string[]>;
static deleteResources(...sources: ResourceSource[]): Promise<void>;
static getFilesTotalSize(...sources: ResourceSource[]): Promise<number>;
private static handleObject;
private static handleLocalFile;
private static handleReleaseModeFile;
private static handleDevModeFile;
private static handleRemoteFile;
}
//# sourceMappingURL=ResourceFetcher.d.ts.map