| inFile | string | Yes | Path of the folder or file to zip. For details about the path, see [FA Model](js-apis-Context.md) or [Stage Model](js-apis-application-context.md).|
| outFile | string | Yes | Path of the zipped file. The file name extension is .zip. |
| options | [Options](#options) | No | Optional parameters for the zip operation. |
| outFile | string | Yes | Path of the zipped file. The file name extension is .zip. |
| options | [Options](#options) | Yes | Optional parameters for the zip operation. |
**Return value**
...
...
@@ -90,8 +90,8 @@ Unzips a file. This API uses a promise to return the result.
| inFile | string | Yes | Path of the folder or file to unzip. For details about the path, see [FA Model](js-apis-Context.md) or [Stage Model](js-apis-application-context.md).|
| outFile | string | Yes | Path of the unzipped file. |
| options | [Options](#options) | No | Optional parameters for the unzip operation. |
| outFile | string | Yes | Path of the unzipped file. |
| options | [Options](#options) | Yes | Optional parameters for the unzip operation. |
**Return value**
...
...
@@ -138,17 +138,17 @@ Compresses a file. This API uses an asynchronous callback to return the result.
**Error codes**
For details about the error codes, see [zlib Error Codes](../errorcodes/errorcode-zlib.md).
@@ -14,10 +14,10 @@ This error code is reported when the source file passed in the **compress** or *
When the **compress** API is called, the file to compress does not exist. When the **decompress** API is called, the file to decompress does not exist.
**Procedure**
**Solution**
1.Check whether the source file exists.
2.Check whether the path of the source file exists and whether the path is the correct sandbox path.
1.Make sure the source file exists.
2.Make sure the path of the source file exists and the path is the correct sandbox path.
## 900002 Invalid Destination File
...
...
@@ -34,7 +34,7 @@ This error code is reported when the destination file passed in the **compress**
1. When the **compress** API is called, the passed destination file path is invalid, for example, a non-exist sandbox path.
2. When the **decompress** API is called, the destination folder does not exist.
**Procedure**
**Solution**
1. Check whether the destination file path is correct. If not, enter the correct sandbox path.
2. Check whether the destination folder exists. If not, create the folder.