wkh237 преди 8 години
родител
ревизия
345a1f1473
променени са 1 файла, в които са добавени 12 реда и са изтрити 18 реда
  1. 12
    18
      README.md

+ 12
- 18
README.md Целия файл

@@ -524,13 +524,13 @@ RNFetchBlob.getSystemDirs().then((dirs) => {
524 524
 ```
525 525
 > 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).
526 526
 
527
-#### createFile(path, data, encoding):Promise
527
+### createFile(path, data, encoding):Promise
528 528
 
529
-##### path:`string`
529
+#### path:`string`
530 530
 The path which this new file will be created.
531
-##### data:`string` | `Array<number>`
531
+#### data:`string` | `Array<number>`
532 532
 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`
534 534
 Encoding of content.
535 535
 
536 536
 the following expressions are equivalent.
@@ -543,13 +543,13 @@ fs.createFile(NEW_FILE_PATH, [102, 111, 111], 'ascii')
543 543
 fs.createFile(NEW_FILE_PATH, base64.encode('foo'), 'base64')
544 544
 ```
545 545
 
546
-#### writeStream(path:string, encoding:string, append:boolean):Promise<WriteStream>
546
+### writeStream(path:string, encoding:string, append:boolean):Promise<WriteStream>
547 547
 
548
-##### path:`string`
548
+#### path:`string`
549 549
 The path to the file the stream is writing to.
550
-##### encoding:`utf8` | `base64` | `ascii`
550
+#### encoding:`utf8` | `base64` | `ascii`
551 551
 Encoding of input data.
552
-##### append:`boolean`(optional, default to `false`)
552
+#### append:`boolean`(optional, default to `false`)
553 553
 Will new data append after existing file or not.
554 554
 
555 555
 Calling `writeStream` method will returns a Promise, which resolves a `RNFetchBlobWriteSteam` instance when stream opened successfully.
@@ -679,13 +679,11 @@ RNFetchBlob.fs.unlink(path)
679 679
 .catch((err) => { ... })
680 680
 ```
681 681
 
682
-### Types
682
+## Types
683 683
 
684 684
 ---
685 685
 
686
-#### RNFetchBlobConfig
687
-
688
----
686
+### RNFetchBlobConfig
689 687
 
690 688
 A set of configurations that will be injected into a `fetch` method, with the following properties.
691 689
 
@@ -705,9 +703,7 @@ A set of configurations that will be injected into a `fetch` method, with the fo
705 703
 
706 704
 ---
707 705
 
708
-#### RNFetchBlobResponse
709
-
710
----
706
+### RNFetchBlobResponse
711 707
 
712 708
 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)
713 709
 
@@ -729,9 +725,7 @@ resp.session('session-name')
729 725
 
730 726
 ---
731 727
 
732
-#### RNFetchBlobSession
733
-
734
----
728
+### RNFetchBlobSession
735 729
 
736 730
 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.
737 731