Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 345a1f1

Browse files
committed
Update README.md
1 parent 4d3d99f commit 345a1f1

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

README.md

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -524,13 +524,13 @@ RNFetchBlob.getSystemDirs().then((dirs) => {
524524
```
525525
> If you're going to make downloaded file visible in Android `Downloads` app, please see [Show Downloaded File and Notification in Android Downloads App](#user-content-show-downloaded-file-and-notifiction-in-android-downloads-app).
526526
527-
#### createFile(path, data, encoding):Promise
527+
### createFile(path, data, encoding):Promise
528528

529-
##### path:`string`
529+
#### path:`string`
530530
The path which this new file will be created.
531-
##### data:`string` | `Array<number>`
531+
#### data:`string` | `Array<number>`
532532
Content of the new file, when `encoding` is `ascii`, this argument shoud be an array contains number 0~255.
533-
##### encoding:`utf8` | `base64` | `ascii`
533+
#### encoding:`utf8` | `base64` | `ascii`
534534
Encoding of content.
535535

536536
the following expressions are equivalent.
@@ -543,13 +543,13 @@ fs.createFile(NEW_FILE_PATH, [102, 111, 111], 'ascii')
543543
fs.createFile(NEW_FILE_PATH, base64.encode('foo'), 'base64')
544544
```
545545

546-
#### writeStream(path:string, encoding:string, append:boolean):Promise<WriteStream>
546+
### writeStream(path:string, encoding:string, append:boolean):Promise<WriteStream>
547547

548-
##### path:`string`
548+
#### path:`string`
549549
The path to the file the stream is writing to.
550-
##### encoding:`utf8` | `base64` | `ascii`
550+
#### encoding:`utf8` | `base64` | `ascii`
551551
Encoding of input data.
552-
##### append:`boolean`(optional, default to `false`)
552+
#### append:`boolean`(optional, default to `false`)
553553
Will new data append after existing file or not.
554554

555555
Calling `writeStream` method will returns a Promise, which resolves a `RNFetchBlobWriteSteam` instance when stream opened successfully.
@@ -679,13 +679,11 @@ RNFetchBlob.fs.unlink(path)
679679
.catch((err) => { ... })
680680
```
681681

682-
### Types
682+
## Types
683683

684684
---
685685

686-
#### RNFetchBlobConfig
687-
688-
---
686+
### RNFetchBlobConfig
689687

690688
A set of configurations that will be injected into a `fetch` method, with the following properties.
691689

@@ -705,9 +703,7 @@ A set of configurations that will be injected into a `fetch` method, with the fo
705703

706704
---
707705

708-
#### RNFetchBlobResponse
709-
710-
---
706+
### RNFetchBlobResponse
711707

712708
When `fetch` success, it resolve a `FetchBlobResponse` object as first argument. `FetchBlobResponse` object has the following methods (these method are synchronous, so you might take quite a performance impact if the file is big)
713709

@@ -729,9 +725,7 @@ resp.session('session-name')
729725

730726
---
731727

732-
#### RNFetchBlobSession
733-
734-
---
728+
### RNFetchBlobSession
735729

736730
A `session` is an object that helps you manage files. It simply main a list of file path and let you use `dispose()`to delete files in this session once and for all.
737731

0 commit comments

Comments
 (0)