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