rn-file-toolkit 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -433
- package/android/src/main/java/com/filetoolkit/FileToolkitModule.kt +123 -2
- package/ios/FileToolkit.mm +61 -19
- package/lib/commonjs/index.js +147 -562
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +147 -562
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +27 -443
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +27 -443
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +177 -783
|
@@ -1,122 +1,53 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rich progress information emitted during a download.
|
|
3
|
-
* Replaces the plain `number` percent from earlier versions.
|
|
4
|
-
*/
|
|
5
1
|
export interface ProgressInfo {
|
|
6
|
-
/** Download progress as a percentage (0–100) */
|
|
7
2
|
percent: number;
|
|
8
|
-
/** Number of bytes downloaded so far */
|
|
9
3
|
bytesDownloaded: number;
|
|
10
|
-
/** Total file size in bytes (0 if unknown) */
|
|
11
4
|
totalBytes: number;
|
|
12
|
-
/** Current download speed in bytes per second */
|
|
13
5
|
speedBps: number;
|
|
14
|
-
/** Estimated seconds remaining (0 if unknown) */
|
|
15
6
|
etaSeconds: number;
|
|
16
7
|
}
|
|
17
8
|
export interface DownloadOptions {
|
|
18
|
-
/** Remote URL to download from */
|
|
19
9
|
url: string;
|
|
20
|
-
/** Optional file name. Auto-detected from URL if not provided */
|
|
21
10
|
fileName?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Run as a background download.
|
|
24
|
-
* - iOS: uses NSURLSession background configuration
|
|
25
|
-
* - Android: uses system DownloadManager
|
|
26
|
-
* Background downloads survive app suspension. Listen to `onDownloadComplete`
|
|
27
|
-
* and `onDownloadError` events instead of awaiting the promise.
|
|
28
|
-
*/
|
|
29
11
|
background?: boolean;
|
|
30
|
-
/** Custom request headers (e.g. Authorization) */
|
|
31
12
|
headers?: Record<string, string>;
|
|
32
|
-
/**
|
|
33
|
-
* Destination directory for the downloaded file.
|
|
34
|
-
* - 'downloads': Public Downloads folder (default)
|
|
35
|
-
* - 'cache': App-private cache directory (cleared by OS when space is low)
|
|
36
|
-
* - 'documents': App-private documents directory (persisted)
|
|
37
|
-
*/
|
|
38
13
|
destination?: 'downloads' | 'cache' | 'documents';
|
|
39
|
-
/** Android only: custom title for the system download notification */
|
|
40
14
|
notificationTitle?: string;
|
|
41
|
-
/** Android only: custom description for the system download notification */
|
|
42
15
|
notificationDescription?: string;
|
|
43
|
-
/** Optional checksum verification after download completes */
|
|
44
16
|
checksum?: {
|
|
45
17
|
hash: string;
|
|
46
18
|
algorithm: 'md5' | 'sha1' | 'sha256';
|
|
47
19
|
};
|
|
48
|
-
/** Called with rich progress info during foreground downloads */
|
|
49
20
|
onProgress?: (info: ProgressInfo) => void;
|
|
50
|
-
/**
|
|
51
|
-
* Join the managed download queue instead of starting immediately.
|
|
52
|
-
* Respects the `maxConcurrent` limit set via `setQueueOptions()`.
|
|
53
|
-
* Defaults to `false`.
|
|
54
|
-
*/
|
|
55
21
|
queue?: boolean;
|
|
56
|
-
|
|
57
|
-
* Priority inside the queue.
|
|
58
|
-
* - `'high'`: inserted at the front of the pending queue.
|
|
59
|
-
* - `'normal'` (default): appended to the back.
|
|
60
|
-
* Has no effect when `queue` is `false`.
|
|
61
|
-
*/
|
|
22
|
+
downloadId?: string;
|
|
62
23
|
priority?: 'high' | 'normal';
|
|
63
|
-
/**
|
|
64
|
-
* Auto-retry on network failure with exponential backoff.
|
|
65
|
-
* Only retries on network errors (timeouts, connection drops).
|
|
66
|
-
* Server errors (4xx/5xx) and checksum mismatches are NOT retried.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```ts
|
|
70
|
-
* download({
|
|
71
|
-
* url: '...',
|
|
72
|
-
* retry: {
|
|
73
|
-
* attempts: 3,
|
|
74
|
-
* delay: 1000, // 1s → 2s → 4s (doubles each time, capped at 30s)
|
|
75
|
-
* onRetry: (attempt, error) => console.log(`Retry #${attempt}: ${error}`),
|
|
76
|
-
* }
|
|
77
|
-
* })
|
|
78
|
-
* ```
|
|
79
|
-
*/
|
|
80
24
|
retry?: {
|
|
81
|
-
/** Maximum number of retry attempts (default: 0 = no retry) */
|
|
82
25
|
attempts: number;
|
|
83
|
-
/** Base delay in ms between retries. Doubles each attempt (default: 1000) */
|
|
84
26
|
delay?: number;
|
|
85
|
-
/** Called just before each retry attempt */
|
|
86
27
|
onRetry?: (attempt: number, error: string) => void;
|
|
87
28
|
};
|
|
88
29
|
}
|
|
89
30
|
export interface UploadOptions {
|
|
90
|
-
/** Remote URL to upload to */
|
|
91
31
|
url: string;
|
|
92
|
-
/** Absolute local path of the file to upload */
|
|
93
32
|
filePath: string;
|
|
94
|
-
/** Multi-part field name for the file (default: 'file') */
|
|
95
33
|
fieldName?: string;
|
|
96
|
-
/** Custom request headers */
|
|
97
34
|
headers?: Record<string, string>;
|
|
98
|
-
/** Additional text parameters for the multi-part request */
|
|
99
35
|
parameters?: Record<string, string>;
|
|
100
|
-
/** Called with progress 0–100 during upload */
|
|
101
36
|
onProgress?: (percent: number) => void;
|
|
37
|
+
uploadId?: string;
|
|
102
38
|
}
|
|
103
39
|
export interface DownloadResult {
|
|
104
40
|
success: boolean;
|
|
105
|
-
/** Local path of the saved file */
|
|
106
41
|
filePath?: string;
|
|
107
|
-
/** Unique ID for this download — use with pause/resume/cancel */
|
|
108
42
|
downloadId?: string;
|
|
109
|
-
/** Error message if success is false */
|
|
110
43
|
error?: string;
|
|
111
44
|
}
|
|
112
45
|
export interface UploadResult {
|
|
113
46
|
success: boolean;
|
|
114
|
-
/** HTTP response status code */
|
|
115
47
|
status?: number;
|
|
116
|
-
/** HTTP response body as string (if any) */
|
|
117
48
|
data?: string;
|
|
118
|
-
/** Error message if success is false */
|
|
119
49
|
error?: string;
|
|
50
|
+
uploadId?: string;
|
|
120
51
|
}
|
|
121
52
|
export interface ActionResult {
|
|
122
53
|
success: boolean;
|
|
@@ -125,9 +56,7 @@ export interface ActionResult {
|
|
|
125
56
|
export interface CachedFile {
|
|
126
57
|
fileName: string;
|
|
127
58
|
filePath: string;
|
|
128
|
-
/** File size in bytes */
|
|
129
59
|
size: number;
|
|
130
|
-
/** Last-modified timestamp in milliseconds */
|
|
131
60
|
modifiedAt: number;
|
|
132
61
|
}
|
|
133
62
|
export interface CacheResult {
|
|
@@ -136,82 +65,50 @@ export interface CacheResult {
|
|
|
136
65
|
error?: string;
|
|
137
66
|
}
|
|
138
67
|
export interface SaveBase64Options {
|
|
139
|
-
/**
|
|
140
|
-
* Base64 string or data URI (e.g., "data:image/png;base64,iVBORw0...")
|
|
141
|
-
* If a data URI is provided, the base64 portion will be extracted automatically.
|
|
142
|
-
*/
|
|
143
68
|
base64Data: string;
|
|
144
|
-
/** Optional file name. Auto-generated if not provided */
|
|
145
69
|
fileName?: string;
|
|
146
|
-
/**
|
|
147
|
-
* Destination directory for the saved file.
|
|
148
|
-
* - 'downloads': Public Downloads folder (default)
|
|
149
|
-
* - 'cache': App-private cache directory
|
|
150
|
-
* - 'documents': App-private documents directory
|
|
151
|
-
*/
|
|
152
70
|
destination?: 'downloads' | 'cache' | 'documents';
|
|
153
71
|
}
|
|
154
72
|
export interface SaveBase64Result {
|
|
155
73
|
success: boolean;
|
|
156
|
-
/** Local path of the saved file */
|
|
157
74
|
filePath?: string;
|
|
158
|
-
/** Error message if success is false */
|
|
159
75
|
error?: string;
|
|
160
76
|
}
|
|
161
77
|
export interface UrlToBase64Options {
|
|
162
|
-
/** URL of the file to convert to base64 (image, video, gif, etc.) */
|
|
163
78
|
url: string;
|
|
164
|
-
/** Optional custom headers (e.g., Authorization) */
|
|
165
79
|
headers?: Record<string, string>;
|
|
166
80
|
}
|
|
167
81
|
export interface UrlToBase64Result {
|
|
168
82
|
success: boolean;
|
|
169
|
-
/** Base64-encoded string */
|
|
170
83
|
base64?: string;
|
|
171
|
-
/** MIME type detected from response (e.g., 'image/png') */
|
|
172
84
|
mimeType?: string;
|
|
173
|
-
/** Complete data URI (e.g., 'data:image/png;base64,...') */
|
|
174
85
|
dataUri?: string;
|
|
175
|
-
/** Error message if success is false */
|
|
176
86
|
error?: string;
|
|
177
87
|
}
|
|
178
88
|
export interface ShareFileOptions {
|
|
179
|
-
/** Absolute path to the file to share */
|
|
180
89
|
filePath: string;
|
|
181
|
-
/** Optional title for the share dialog (Android only) */
|
|
182
90
|
title?: string;
|
|
183
|
-
/** Optional subject for email sharing (Android only) */
|
|
184
91
|
subject?: string;
|
|
185
92
|
}
|
|
186
93
|
export interface OpenFileOptions {
|
|
187
|
-
/** Absolute path to the file to open */
|
|
188
94
|
filePath: string;
|
|
189
|
-
/** MIME type of the file (e.g., 'application/pdf', 'image/jpeg'). Auto-detected if not provided. */
|
|
190
95
|
mimeType?: string;
|
|
191
96
|
}
|
|
192
97
|
export interface ShareFileResult {
|
|
193
98
|
success: boolean;
|
|
194
|
-
/** Whether user completed the share action (iOS only) */
|
|
195
99
|
completed?: boolean;
|
|
196
|
-
/** Error message if success is false */
|
|
197
100
|
error?: string;
|
|
198
101
|
}
|
|
199
102
|
export interface OpenFileResult {
|
|
200
103
|
success: boolean;
|
|
201
|
-
/** Error message if success is false */
|
|
202
104
|
error?: string;
|
|
203
105
|
}
|
|
204
106
|
export type FsEncoding = 'utf8' | 'base64';
|
|
205
107
|
export interface FsStat {
|
|
206
|
-
/** Absolute path */
|
|
207
108
|
path: string;
|
|
208
|
-
/** Basename */
|
|
209
109
|
name: string;
|
|
210
|
-
/** Size in bytes (0 for directories) */
|
|
211
110
|
size: number;
|
|
212
|
-
/** Last modified timestamp in milliseconds */
|
|
213
111
|
modified: number;
|
|
214
|
-
/** Whether path is a directory */
|
|
215
112
|
isDir: boolean;
|
|
216
113
|
}
|
|
217
114
|
export interface FsApi {
|
|
@@ -226,377 +123,64 @@ export interface FsApi {
|
|
|
226
123
|
ls: (dirPath: string) => Promise<string[]>;
|
|
227
124
|
}
|
|
228
125
|
export interface QueueOptions {
|
|
229
|
-
/**
|
|
230
|
-
* Maximum number of simultaneous downloads when using the managed queue.
|
|
231
|
-
* Defaults to `3`.
|
|
232
|
-
*/
|
|
233
126
|
maxConcurrent?: number;
|
|
234
127
|
}
|
|
235
128
|
export interface QueueStatus {
|
|
236
|
-
/** Number of downloads actively running right now */
|
|
237
129
|
active: number;
|
|
238
|
-
/** Number of downloads waiting in the queue */
|
|
239
130
|
pending: number;
|
|
240
|
-
/** Current `maxConcurrent` setting */
|
|
241
131
|
maxConcurrent: number;
|
|
242
132
|
}
|
|
243
|
-
/**
|
|
244
|
-
* Configure the global managed download queue.
|
|
245
|
-
*
|
|
246
|
-
* @example
|
|
247
|
-
* ```ts
|
|
248
|
-
* setQueueOptions({ maxConcurrent: 3 });
|
|
249
|
-
* ```
|
|
250
|
-
*/
|
|
251
133
|
export declare function setQueueOptions(options: QueueOptions): void;
|
|
252
|
-
/**
|
|
253
|
-
* Get the current state of the managed download queue.
|
|
254
|
-
*
|
|
255
|
-
* @example
|
|
256
|
-
* ```ts
|
|
257
|
-
* const { active, pending, maxConcurrent } = getQueueStatus();
|
|
258
|
-
* ```
|
|
259
|
-
*/
|
|
260
134
|
export declare function getQueueStatus(): QueueStatus;
|
|
261
|
-
/**
|
|
262
|
-
* Download a file.
|
|
263
|
-
*
|
|
264
|
-
* For **foreground** downloads the promise resolves when the file is saved.
|
|
265
|
-
* For **background** downloads the promise resolves immediately with a
|
|
266
|
-
* `downloadId`; listen to the `onDownloadComplete` / `onDownloadError`
|
|
267
|
-
* events for the final result.
|
|
268
|
-
*
|
|
269
|
-
* Pass `queue: true` to join the managed queue and respect the `maxConcurrent`
|
|
270
|
-
* limit configured via `setQueueOptions()`. Use `priority: 'high'` to jump
|
|
271
|
-
* ahead of other pending items in the queue.
|
|
272
|
-
*
|
|
273
|
-
* @example
|
|
274
|
-
* ```ts
|
|
275
|
-
* // Direct (unqueued) download
|
|
276
|
-
* const result = await download({ url: 'https://...' });
|
|
277
|
-
*
|
|
278
|
-
* // Queued download with high priority
|
|
279
|
-
* setQueueOptions({ maxConcurrent: 3 });
|
|
280
|
-
* const result = await download({
|
|
281
|
-
* url: 'https://...',
|
|
282
|
-
* queue: true,
|
|
283
|
-
* priority: 'high',
|
|
284
|
-
* });
|
|
285
|
-
* ```
|
|
286
|
-
*/
|
|
287
135
|
export declare function download(options: DownloadOptions): Promise<DownloadResult>;
|
|
288
|
-
/**
|
|
289
|
-
* Upload a file using multipart/form-data.
|
|
290
|
-
*/
|
|
291
136
|
export declare function upload(options: UploadOptions): Promise<UploadResult>;
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
* On Android the download thread is suspended.
|
|
296
|
-
*/
|
|
297
|
-
export declare function pauseDownload(downloadId: string): Promise<ActionResult>;
|
|
298
|
-
/**
|
|
299
|
-
* Resume a previously paused download.
|
|
300
|
-
* On iOS resumes from partial data (HTTP Range). On Android unblocks the thread.
|
|
301
|
-
*/
|
|
302
|
-
export declare function resumeDownload(downloadId: string): Promise<ActionResult>;
|
|
303
|
-
/**
|
|
304
|
-
* Cancel and discard a download (foreground or background).
|
|
305
|
-
* Any partially-downloaded file is deleted.
|
|
306
|
-
*/
|
|
307
|
-
export declare function cancelDownload(downloadId: string): Promise<ActionResult>;
|
|
308
|
-
/**
|
|
309
|
-
* List all files in the app's cache directory.
|
|
310
|
-
*/
|
|
137
|
+
export declare function pauseDownload(id: string): Promise<ActionResult>;
|
|
138
|
+
export declare function resumeDownload(id: string): Promise<ActionResult>;
|
|
139
|
+
export declare function cancelDownload(id: string): Promise<ActionResult>;
|
|
311
140
|
export declare function getCachedFiles(): Promise<CacheResult>;
|
|
312
|
-
|
|
313
|
-
* Delete a single file by its absolute path.
|
|
314
|
-
*/
|
|
315
|
-
export declare function deleteFile(filePath: string): Promise<ActionResult>;
|
|
316
|
-
/**
|
|
317
|
-
* Delete all files in the app's cache directory.
|
|
318
|
-
*/
|
|
141
|
+
export declare function deleteFile(path: string): Promise<ActionResult>;
|
|
319
142
|
export declare function clearCache(): Promise<ActionResult>;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
export declare function
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
status: number;
|
|
330
|
-
progress: number;
|
|
331
|
-
}>;
|
|
332
|
-
error?: string;
|
|
333
|
-
}>;
|
|
334
|
-
/** Check whether a file or directory exists. */
|
|
335
|
-
export declare function exists(filePath: string): Promise<boolean>;
|
|
336
|
-
/** Get file or directory metadata. */
|
|
337
|
-
export declare function stat(filePath: string): Promise<FsStat>;
|
|
338
|
-
/** Read a file as utf8 (default) or base64 string. */
|
|
339
|
-
export declare function readFile(filePath: string, encoding?: FsEncoding): Promise<string>;
|
|
340
|
-
/** Write utf8 (default) or base64 data to a file. */
|
|
341
|
-
export declare function writeFile(filePath: string, data: string, encoding?: FsEncoding): Promise<void>;
|
|
342
|
-
/** Copy a file from source to destination. */
|
|
343
|
-
export declare function copyFile(fromPath: string, toPath: string): Promise<void>;
|
|
344
|
-
/** Move a file from source to destination. */
|
|
345
|
-
export declare function moveFile(fromPath: string, toPath: string): Promise<void>;
|
|
346
|
-
/** Create a directory recursively. */
|
|
347
|
-
export declare function mkdir(dirPath: string): Promise<void>;
|
|
348
|
-
/** List direct entries (names) in a directory. */
|
|
349
|
-
export declare function ls(dirPath: string): Promise<string[]>;
|
|
350
|
-
/**
|
|
351
|
-
* File system API namespace.
|
|
352
|
-
*
|
|
353
|
-
* @example
|
|
354
|
-
* ```ts
|
|
355
|
-
* import { fs } from 'rn-file-toolkit';
|
|
356
|
-
*
|
|
357
|
-
* const ok = await fs.exists('/path/to/file.pdf');
|
|
358
|
-
* const meta = await fs.stat('/path/to/file.pdf');
|
|
359
|
-
* const text = await fs.readFile('/path/to/file.txt');
|
|
360
|
-
* ```
|
|
361
|
-
*/
|
|
143
|
+
export declare function getBackgroundDownloads(): Promise<any>;
|
|
144
|
+
export declare function exists(path: string): Promise<boolean>;
|
|
145
|
+
export declare function stat(path: string): Promise<FsStat>;
|
|
146
|
+
export declare function readFile(path: string, enc?: FsEncoding): Promise<string>;
|
|
147
|
+
export declare function writeFile(path: string, data: string, enc?: FsEncoding): Promise<void>;
|
|
148
|
+
export declare function copyFile(from: string, to: string): Promise<void>;
|
|
149
|
+
export declare function moveFile(from: string, to: string): Promise<void>;
|
|
150
|
+
export declare function mkdir(path: string): Promise<void>;
|
|
151
|
+
export declare function ls(path: string): Promise<string[]>;
|
|
362
152
|
export declare const fs: FsApi;
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
export declare function
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
*/
|
|
372
|
-
export declare function onDownloadError(callback: (result: DownloadResult) => void): () => void;
|
|
373
|
-
/**
|
|
374
|
-
* Subscribe to upload progress events.
|
|
375
|
-
* Returns an unsubscribe function.
|
|
376
|
-
*/
|
|
377
|
-
export declare function onUploadProgress(callback: (result: {
|
|
378
|
-
url: string;
|
|
379
|
-
progress: number;
|
|
380
|
-
}) => void): () => void;
|
|
381
|
-
/**
|
|
382
|
-
* Subscribe to download retry events (fired before each retry attempt).
|
|
383
|
-
* Returns an unsubscribe function.
|
|
384
|
-
*/
|
|
385
|
-
export declare function onDownloadRetry(callback: (result: {
|
|
386
|
-
downloadId: string;
|
|
387
|
-
url: string;
|
|
388
|
-
attempt: number;
|
|
389
|
-
}) => void): () => void;
|
|
390
|
-
/**
|
|
391
|
-
* Save a base64 string or data URI as a file.
|
|
392
|
-
* Supports data URIs (e.g., "data:image/png;base64,iVBORw0...") and plain base64 strings.
|
|
393
|
-
*
|
|
394
|
-
* @example
|
|
395
|
-
* ```typescript
|
|
396
|
-
* // From data URI
|
|
397
|
-
* const result = await saveBase64AsFile({
|
|
398
|
-
* base64Data: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...',
|
|
399
|
-
* fileName: 'photo.png',
|
|
400
|
-
* destination: 'documents'
|
|
401
|
-
* });
|
|
402
|
-
*
|
|
403
|
-
* // From plain base64
|
|
404
|
-
* const result = await saveBase64AsFile({
|
|
405
|
-
* base64Data: 'SGVsbG8gV29ybGQ=',
|
|
406
|
-
* fileName: 'hello.txt',
|
|
407
|
-
* destination: 'cache'
|
|
408
|
-
* });
|
|
409
|
-
* ```
|
|
410
|
-
*/
|
|
411
|
-
export declare function saveBase64AsFile(options: SaveBase64Options): Promise<SaveBase64Result>;
|
|
412
|
-
/**
|
|
413
|
-
* Convert a web URL (image, video, gif, etc.) to base64 string.
|
|
414
|
-
* Downloads the file and returns both the base64 string and data URI format.
|
|
415
|
-
*
|
|
416
|
-
* @example
|
|
417
|
-
* ```typescript
|
|
418
|
-
* // Convert image to base64
|
|
419
|
-
* const result = await urlToBase64({
|
|
420
|
-
* url: 'https://example.com/photo.jpg',
|
|
421
|
-
* headers: { Authorization: 'Bearer token' }
|
|
422
|
-
* });
|
|
423
|
-
*
|
|
424
|
-
* if (result.success) {
|
|
425
|
-
* console.log('Base64:', result.base64);
|
|
426
|
-
* console.log('Data URI:', result.dataUri);
|
|
427
|
-
* console.log('MIME Type:', result.mimeType);
|
|
428
|
-
* }
|
|
429
|
-
* ```
|
|
430
|
-
*/
|
|
431
|
-
export declare function urlToBase64(options: UrlToBase64Options): Promise<UrlToBase64Result>;
|
|
432
|
-
/**
|
|
433
|
-
* Share a file with other apps using the native share dialog.
|
|
434
|
-
* Opens the system share sheet on iOS and share chooser on Android.
|
|
435
|
-
*
|
|
436
|
-
* @example
|
|
437
|
-
* ```typescript
|
|
438
|
-
* const result = await shareFile({
|
|
439
|
-
* filePath: '/path/to/document.pdf',
|
|
440
|
-
* title: 'Share Document',
|
|
441
|
-
* subject: 'Check out this file'
|
|
442
|
-
* });
|
|
443
|
-
*
|
|
444
|
-
* if (result.success) {
|
|
445
|
-
* console.log('File shared successfully');
|
|
446
|
-
* }
|
|
447
|
-
* ```
|
|
448
|
-
*/
|
|
449
|
-
export declare function shareFile(options: ShareFileOptions): Promise<ShareFileResult>;
|
|
450
|
-
/**
|
|
451
|
-
* Open a file with the default app or app chooser.
|
|
452
|
-
* On iOS, displays a preview or shows apps that can handle the file.
|
|
453
|
-
* On Android, opens with the default app or shows app chooser.
|
|
454
|
-
*
|
|
455
|
-
* @example
|
|
456
|
-
* ```typescript
|
|
457
|
-
* const result = await openFile({
|
|
458
|
-
* filePath: '/path/to/document.pdf',
|
|
459
|
-
* mimeType: 'application/pdf' // optional, auto-detected if not provided
|
|
460
|
-
* });
|
|
461
|
-
*
|
|
462
|
-
* if (result.success) {
|
|
463
|
-
* console.log('File opened successfully');
|
|
464
|
-
* }
|
|
465
|
-
* ```
|
|
466
|
-
*/
|
|
467
|
-
export declare function openFile(options: OpenFileOptions): Promise<OpenFileResult>;
|
|
153
|
+
export declare function onDownloadComplete(cb: any): () => void;
|
|
154
|
+
export declare function onDownloadError(cb: any): () => void;
|
|
155
|
+
export declare function onUploadProgress(cb: any): () => void;
|
|
156
|
+
export declare function onDownloadRetry(cb: any): () => void;
|
|
157
|
+
export declare function saveBase64AsFile(opts: SaveBase64Options): Promise<SaveBase64Result>;
|
|
158
|
+
export declare function urlToBase64(opts: UrlToBase64Options): Promise<UrlToBase64Result>;
|
|
159
|
+
export declare function shareFile(opts: ShareFileOptions): Promise<ShareFileResult>;
|
|
160
|
+
export declare function openFile(opts: OpenFileOptions): Promise<OpenFileResult>;
|
|
468
161
|
export interface UnzipResult {
|
|
469
162
|
success: boolean;
|
|
470
|
-
/** Absolute path of the destination directory */
|
|
471
163
|
destDir?: string;
|
|
472
|
-
/** List of absolute paths of all extracted files */
|
|
473
164
|
files?: string[];
|
|
474
|
-
/** Error message if success is false */
|
|
475
165
|
error?: string;
|
|
476
166
|
}
|
|
477
167
|
export interface ZipResult {
|
|
478
168
|
success: boolean;
|
|
479
|
-
/** Absolute path of the created zip archive */
|
|
480
169
|
zipPath?: string;
|
|
481
|
-
/** Error message if success is false */
|
|
482
170
|
error?: string;
|
|
483
171
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
*
|
|
487
|
-
* Uses `java.util.zip` on Android and zlib (system framework) on iOS.
|
|
488
|
-
* No third-party dependency required.
|
|
489
|
-
*
|
|
490
|
-
* @param sourcePath Absolute path to the `.zip` file
|
|
491
|
-
* @param destDir Absolute path to the directory where files will be extracted.
|
|
492
|
-
* The directory is created automatically if it does not exist.
|
|
493
|
-
*
|
|
494
|
-
* @example
|
|
495
|
-
* ```ts
|
|
496
|
-
* const result = await unzip(
|
|
497
|
-
* '/path/to/archive.zip',
|
|
498
|
-
* '/path/to/output-folder'
|
|
499
|
-
* );
|
|
500
|
-
*
|
|
501
|
-
* if (result.success) {
|
|
502
|
-
* console.log('Extracted files:', result.files);
|
|
503
|
-
* }
|
|
504
|
-
* ```
|
|
505
|
-
*/
|
|
506
|
-
export declare function unzip(sourcePath: string, destDir: string): Promise<UnzipResult>;
|
|
507
|
-
/**
|
|
508
|
-
* Create a ZIP archive from a file or directory.
|
|
509
|
-
*
|
|
510
|
-
* Uses `java.util.zip` on Android and zlib (system framework) on iOS.
|
|
511
|
-
* No third-party dependency required.
|
|
512
|
-
*
|
|
513
|
-
* @param sourcePath Absolute path to the file or directory to compress
|
|
514
|
-
* @param destPath Absolute path for the output `.zip` file.
|
|
515
|
-
* Parent directory is created automatically if needed.
|
|
516
|
-
*
|
|
517
|
-
* @example
|
|
518
|
-
* ```ts
|
|
519
|
-
* // Zip a single file
|
|
520
|
-
* const result = await zip(
|
|
521
|
-
* '/path/to/document.pdf',
|
|
522
|
-
* '/path/to/document.zip'
|
|
523
|
-
* );
|
|
524
|
-
*
|
|
525
|
-
* // Zip an entire directory
|
|
526
|
-
* const result = await zip(
|
|
527
|
-
* '/path/to/my-folder',
|
|
528
|
-
* '/path/to/my-folder.zip'
|
|
529
|
-
* );
|
|
530
|
-
*
|
|
531
|
-
* if (result.success) {
|
|
532
|
-
* console.log('Archive created at:', result.zipPath);
|
|
533
|
-
* }
|
|
534
|
-
* ```
|
|
535
|
-
*/
|
|
536
|
-
export declare function zip(sourcePath: string, destPath: string): Promise<ZipResult>;
|
|
537
|
-
export type DownloadStatus = 'idle' | 'downloading' | 'paused' | 'done' | 'error';
|
|
172
|
+
export declare function unzip(s: string, d: string): Promise<UnzipResult>;
|
|
173
|
+
export declare function zip(s: string, d: string): Promise<ZipResult>;
|
|
538
174
|
export interface UseDownloadReturn {
|
|
539
|
-
/** Start a download. Resolves with the final result. */
|
|
540
175
|
start: (options: DownloadOptions) => Promise<DownloadResult>;
|
|
541
|
-
/** Pause the current download */
|
|
542
176
|
pause: () => Promise<void>;
|
|
543
|
-
/** Resume the current download */
|
|
544
177
|
resume: () => Promise<void>;
|
|
545
|
-
/** Cancel the current download */
|
|
546
178
|
cancel: () => Promise<void>;
|
|
547
|
-
|
|
548
|
-
status: DownloadStatus;
|
|
549
|
-
/** Rich progress information (null until first progress event) */
|
|
179
|
+
status: 'idle' | 'downloading' | 'paused' | 'done' | 'error';
|
|
550
180
|
progress: ProgressInfo | null;
|
|
551
|
-
/** Final result once download completes or fails */
|
|
552
181
|
result: DownloadResult | null;
|
|
553
|
-
/** The active download ID (available after download starts) */
|
|
554
182
|
downloadId: string | null;
|
|
555
183
|
}
|
|
556
|
-
/**
|
|
557
|
-
* React hook for managing a single download with built-in state.
|
|
558
|
-
*
|
|
559
|
-
* Tracks status, rich progress (percent, speed, ETA), and the final result.
|
|
560
|
-
* Exposes `pause`, `resume`, and `cancel` controls tied to the active download.
|
|
561
|
-
*
|
|
562
|
-
* @example
|
|
563
|
-
* ```tsx
|
|
564
|
-
* function DownloadButton() {
|
|
565
|
-
* const { start, pause, resume, cancel, status, progress, result } = useDownload();
|
|
566
|
-
*
|
|
567
|
-
* return (
|
|
568
|
-
* <View>
|
|
569
|
-
* <Button
|
|
570
|
-
* title="Download"
|
|
571
|
-
* onPress={() => start({ url: 'https://example.com/file.zip' })}
|
|
572
|
-
* />
|
|
573
|
-
*
|
|
574
|
-
* {status === 'downloading' && progress && (
|
|
575
|
-
* <View>
|
|
576
|
-
* <Text>{progress.percent.toFixed(1)}%</Text>
|
|
577
|
-
* <Text>Speed: {(progress.speedBps / 1024).toFixed(1)} KB/s</Text>
|
|
578
|
-
* <Text>ETA: {progress.etaSeconds.toFixed(0)}s</Text>
|
|
579
|
-
* <ProgressBar value={progress.percent / 100} />
|
|
580
|
-
* <Button title="Pause" onPress={pause} />
|
|
581
|
-
* </View>
|
|
582
|
-
* )}
|
|
583
|
-
*
|
|
584
|
-
* {status === 'paused' && (
|
|
585
|
-
* <Button title="Resume" onPress={resume} />
|
|
586
|
-
* )}
|
|
587
|
-
*
|
|
588
|
-
* {status === 'done' && result?.success && (
|
|
589
|
-
* <Text>Saved to: {result.filePath}</Text>
|
|
590
|
-
* )}
|
|
591
|
-
*
|
|
592
|
-
* {status === 'error' && (
|
|
593
|
-
* <Text>Error: {result?.error}</Text>
|
|
594
|
-
* )}
|
|
595
|
-
* </View>
|
|
596
|
-
* );
|
|
597
|
-
* }
|
|
598
|
-
* ```
|
|
599
|
-
*/
|
|
600
184
|
export declare function useDownload(): UseDownloadReturn;
|
|
601
185
|
declare const _default: {
|
|
602
186
|
download: typeof download;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;I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M,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,wBAAgB,WAAW,IAAI,iBAAiB,CAyD/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,wBAgCE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rn-file-toolkit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "The simplest and most reliable way to download files in React Native with progress, permissions, and file handling built-in.",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/module/index.js",
|