|
1 | 1 | --- |
2 | 2 | title: Filesystem Capacitor Plugin API |
3 | 3 | description: The Filesystem API provides a NodeJS-like API for working with files on the device. |
4 | | -custom_edit_url: https://github.com/ionic-team/capacitor-filesystem/blob/next/packages/capacitor-plugin/README.md |
5 | | -editApiUrl: https://github.com/ionic-team/capacitor-filesystem/blob/next/packages/capacitor-plugin/src/definitions.ts |
| 4 | +custom_edit_url: https://github.com/ionic-team/capacitor-filesystem/blob/main/packages/capacitor-plugin/README.md |
| 5 | +editApiUrl: https://github.com/ionic-team/capacitor-filesystem/blob/main/packages/capacitor-plugin/src/definitions.ts |
6 | 6 | sidebar_label: Filesystem |
7 | 7 | --- |
8 | 8 |
|
@@ -549,11 +549,13 @@ We recommend using the @capacitor/file-transfer plugin instead, in conjunction w |
549 | 549 |
|
550 | 550 | #### ReadFileOptions |
551 | 551 |
|
552 | | -| Prop | Type | Description | Since | |
553 | | -| --------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | |
554 | | -| **`path`** | <code>string</code> | The path of the file to read | 1.0.0 | |
555 | | -| **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to read the file from | 1.0.0 | |
556 | | -| **`encoding`** | <code><a href="#encoding">Encoding</a></code> | The encoding to read the file in, if not provided, data is read as binary and returned as base64 encoded. Pass <a href="#encoding">Encoding.UTF8</a> to read data as string | 1.0.0 | |
| 552 | +| Prop | Type | Description | Default | Since | |
| 553 | +| --------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------- | ----- | |
| 554 | +| **`path`** | <code>string</code> | The path of the file to read | | 1.0.0 | |
| 555 | +| **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to read the file from | | 1.0.0 | |
| 556 | +| **`encoding`** | <code><a href="#encoding">Encoding</a></code> | The encoding to read the file in, if not provided, data is read as binary and returned as base64 encoded. Pass <a href="#encoding">Encoding.UTF8</a> to read data as string | | 1.0.0 | |
| 557 | +| **`offset`** | <code>number</code> | The offset to start reading the file from, in bytes. Native only (not available in web). Can be used in conjunction with length to partially read files. | <code>0</code> | 8.1.0 | |
| 558 | +| **`length`** | <code>number</code> | The length of data to read, in bytes. Any non-positive value means to read to the end of the file. Native only (not available in web). Can be used in conjunction with offset to partially read files. | <code>-1</code> | 8.1.0 | |
557 | 559 |
|
558 | 560 |
|
559 | 561 | #### ReadFileInChunksOptions |
|
0 commit comments