1import { EventEmitter, Subscription } from '@unimodules/core'; 2import { DownloadOptions, DownloadResult, DownloadProgressCallback, DownloadProgressData, DownloadPauseState, FileInfo, EncodingType, ReadingOptions, WritingOptions, ProgressEvent } from './FileSystem.types'; 3export { DownloadOptions, DownloadResult, DownloadProgressCallback, DownloadProgressData, DownloadPauseState, FileInfo, EncodingType, ReadingOptions, WritingOptions, ProgressEvent, }; 4export declare const documentDirectory: string | null; 5export declare const cacheDirectory: string | null; 6export declare const bundledAssets: string | null, bundleDirectory: string | null; 7export declare function getInfoAsync(fileUri: string, options?: { 8 md5?: boolean; 9 size?: boolean; 10}): Promise<FileInfo>; 11export declare function readAsStringAsync(fileUri: string, options?: ReadingOptions): Promise<string>; 12export declare function getContentUriAsync(fileUri: string): Promise<string>; 13export declare function writeAsStringAsync(fileUri: string, contents: string, options?: WritingOptions): Promise<void>; 14export declare function deleteAsync(fileUri: string, options?: { 15 idempotent?: boolean; 16}): Promise<void>; 17export declare function moveAsync(options: { 18 from: string; 19 to: string; 20}): Promise<void>; 21export declare function copyAsync(options: { 22 from: string; 23 to: string; 24}): Promise<void>; 25export declare function makeDirectoryAsync(fileUri: string, options?: { 26 intermediates?: boolean; 27}): Promise<void>; 28export declare function readDirectoryAsync(fileUri: string): Promise<string[]>; 29export declare function getFreeDiskStorageAsync(): Promise<number>; 30export declare function getTotalDiskCapacityAsync(): Promise<number>; 31export declare function downloadAsync(uri: string, fileUri: string, options?: DownloadOptions): Promise<DownloadResult>; 32export declare function createDownloadResumable(uri: string, fileUri: string, options?: DownloadOptions, callback?: DownloadProgressCallback, resumeData?: string): DownloadResumable; 33export declare class DownloadResumable { 34 _uuid: string; 35 _url: string; 36 _fileUri: string; 37 _options: DownloadOptions; 38 _resumeData?: string; 39 _callback?: DownloadProgressCallback; 40 _subscription?: Subscription | null; 41 _emitter: EventEmitter; 42 constructor(url: string, fileUri: string, options?: DownloadOptions, callback?: DownloadProgressCallback, resumeData?: string); 43 downloadAsync(): Promise<DownloadResult | undefined>; 44 pauseAsync(): Promise<DownloadPauseState>; 45 resumeAsync(): Promise<DownloadResult | undefined>; 46 savable(): DownloadPauseState; 47 _addSubscription(): void; 48 _removeSubscription(): void; 49} 50