FileSystemManager.readCompressedFile
JS
FileSystemManager.readCompressedFile(Object object)Reads the content of a local file with a specified compression type
Parameters
- Object object: Input parameters. See the table below for details.
object properties:
| Property | Value Type | Default | Required | Description |
|---|---|---|---|---|
| filePath | string | Yes | Path of the compressed file to read | |
| compressionAlgorithm | string | Yes | File compression type. Currently only 'br' is supported. | |
| success | function | No | Callback for a successful call | |
| fail | function | No | Callback for a failed call | |
| complete | function | No | Callback for when the call ends |
Valid values of compressionAlgorithm:
| Value | Description |
|---|---|
| br | Brotli compression |
Parameters of the success callback
- Object res: Returns information
res properties:
| Property | Value Type | Description |
|---|---|---|
| data | ArrayBuffer | File content |
Parameters of the fail callback
- Object res: Returns error information
res properties:
| Property | Value Type | Description |
|---|---|---|
| errMsg | string | Error information |
