Skip to content

Commit 4c79098

Browse files
YaoHuiJiplrthink
authored andcommitted
Added instructions for compressing single file
I think a lot of people have had problem with not being able to compress a single file and then looking at the issue 240(#240 (comment)) to find a solution, and since the problem has been around for a long time, I think it would be nice to add a note to the readme to be friendly to new users ;)
1 parent 5d47ea9 commit 4c79098

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ import { MainBundlePath, DocumentDirectoryPath } from 'react-native-fs'
5353
5454
***NOTE: only support zip folder, not file entries***
5555

56+
***NOTE: the string version of source is for folder, the string[] version is for file, so you want to zip a single file, use zip([file]) instead of zip(file)***
57+
5658
Example
5759

5860
```js
@@ -74,6 +76,8 @@ zip(sourcePath, targetPath)
7476
7577
***NOTE: only support zip folder, not file entries***
7678

79+
***NOTE: the string version of source is for folder, the string[] version is for file, so you want to zip a single file, use zip([file]) instead of zip(file)***
80+
7781
***NOTE: encryptionType is not supported on iOS yet, so it would be igonred on that platform.***
7882

7983
Example

0 commit comments

Comments
 (0)