Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisjiang committed Aug 9, 2024
1 parent a6314c4 commit 6c7b7ec
Show file tree
Hide file tree
Showing 82 changed files with 208 additions and 107 deletions.
13 changes: 13 additions & 0 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,19 @@ import * as fs from 'happy-opfs';
console.assert(downloadRes.unwrapErr() instanceof Error);
}

{
// Download a file to a temporary file
const downloadTask = fs.downloadFile(mockSingle);
const downloadRes = await downloadTask.response;
downloadRes.inspect(x => {
console.assert(fs.isTempPath(x.filePath));
console.assert(x.rawResponse instanceof Response);
});
if (downloadRes.isOk()) {
await fs.remove(downloadRes.unwrap().filePath);
}
}

// Will create directory
await fs.emptyDir('/not-exists');

Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,19 @@ import * as fs from 'happy-opfs';
console.assert(downloadRes.unwrapErr() instanceof Error);
}

{
// Download a file to a temporary file
const downloadTask = fs.downloadFile(mockSingle);
const downloadRes = await downloadTask.response;
downloadRes.inspect(x => {
console.assert(fs.isTempPath(x.filePath));
console.assert(x.rawResponse instanceof Response);
});
if (downloadRes.isOk()) {
await fs.remove(downloadRes.unwrap().filePath);
}
}

// Will create directory
await fs.emptyDir('/not-exists');

Expand Down
4 changes: 3 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
| Interface | Description |
| ------ | ------ |
| [CopyOptions](interfaces/CopyOptions.md) | Options for `copy`. |
| [DownloadFileTempResponse](interfaces/DownloadFileTempResponse.md) | Result of `downloadFile` when the file is saved to a temporary path. |
| [ErrorLike](interfaces/ErrorLike.md) | Serializable version of Error. |
| [ExistsOptions](interfaces/ExistsOptions.md) | Options to determine the existence of a file or directory. |
| [FileLike](interfaces/FileLike.md) | Serializable version of File. |
Expand Down Expand Up @@ -58,7 +59,7 @@
| [createFileSync](functions/createFileSync.md) | Sync version of `createFile`. |
| [deleteTemp](functions/deleteTemp.md) | Delete the temporary directory and all its contents. |
| [deleteTempSync](functions/deleteTempSync.md) | Sync version of `deleteTemp`. |
| [downloadFile](functions/downloadFile.md) | Downloads a file from a URL and saves it to the specified path. |
| [downloadFile](functions/downloadFile.md) | Downloads a file from a URL and saves it to a temporary file. The returned response will contain the temporary file path. |
| [emptyDir](functions/emptyDir.md) | Empties the contents of a directory at the specified path. |
| [emptyDirSync](functions/emptyDirSync.md) | Sync version of `emptyDir`. |
| [exists](functions/exists.md) | Checks whether a file or directory exists at the specified path. |
Expand All @@ -69,6 +70,7 @@
| [isFileHandle](functions/isFileHandle.md) | Whether the handle is a file. |
| [isFileHandleLike](functions/isFileHandleLike.md) | Whether the handle is a file-like. |
| [isOPFSSupported](functions/isOPFSSupported.md) | Checks if the Origin Private File System (OPFS) is supported in the current environment. |
| [isTempPath](functions/isTempPath.md) | Check whether the path is a temporary path. |
| [mkTemp](functions/mkTemp.md) | Create a temporary file or directory. |
| [mkTempSync](functions/mkTempSync.md) | Sync version of `mkTemp`. |
| [mkdir](functions/mkdir.md) | Creates a new directory at the specified path same as `mkdir -p`. |
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/appendFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the content was

## Defined in

[fs/opfs\_ext.ts:17](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_ext.ts#L17)
[fs/opfs\_ext.ts:17](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_ext.ts#L17)
2 changes: 1 addition & 1 deletion docs/functions/appendFileSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Sync version of `appendFile`.

## Defined in

[worker/opfs\_worker\_adapter.ts:186](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L186)
[worker/opfs\_worker\_adapter.ts:186](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L186)
2 changes: 1 addition & 1 deletion docs/functions/assertAbsolutePath.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Will throw an error if the path is not an absolute path.

## Defined in

[fs/assertions.ts:10](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/assertions.ts#L10)
[fs/assertions.ts:10](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/assertions.ts#L10)
2 changes: 1 addition & 1 deletion docs/functions/assertFileUrl.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Will throw an error if the URL is not a valid file URL.

## Defined in

[fs/assertions.ts:21](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/assertions.ts#L21)
[fs/assertions.ts:21](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/assertions.ts#L21)
2 changes: 1 addition & 1 deletion docs/functions/connectSyncAgent.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Communicate with worker.

## Defined in

[worker/opfs\_worker\_adapter.ts:17](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L17)
[worker/opfs\_worker\_adapter.ts:17](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L17)
2 changes: 1 addition & 1 deletion docs/functions/copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ A promise that resolves to an `AsyncVoidIOResult` indicating whether the file wa

## Defined in

[fs/opfs\_ext.ts:33](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_ext.ts#L33)
[fs/opfs\_ext.ts:33](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_ext.ts#L33)
2 changes: 1 addition & 1 deletion docs/functions/copySync.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ Sync version of `copy`.

## Defined in

[worker/opfs\_worker\_adapter.ts:193](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L193)
[worker/opfs\_worker\_adapter.ts:193](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L193)
2 changes: 1 addition & 1 deletion docs/functions/createFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the file was su

## Defined in

[fs/opfs\_core.ts:15](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_core.ts#L15)
[fs/opfs\_core.ts:15](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_core.ts#L15)
2 changes: 1 addition & 1 deletion docs/functions/createFileSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Sync version of `createFile`.

## Defined in

[worker/opfs\_worker\_adapter.ts:90](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L90)
[worker/opfs\_worker\_adapter.ts:90](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L90)
2 changes: 1 addition & 1 deletion docs/functions/deleteTemp.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ A promise that resolves to an `AsyncVoidIOResult` indicating whether the tempora

## Defined in

[fs/opfs\_tmp.ts:50](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_tmp.ts#L50)
[fs/opfs\_tmp.ts:29](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_tmp.ts#L29)
2 changes: 1 addition & 1 deletion docs/functions/deleteTempSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Sync version of `deleteTemp`.

## Defined in

[worker/opfs\_worker\_adapter.ts:214](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L214)
[worker/opfs\_worker\_adapter.ts:214](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L214)
38 changes: 33 additions & 5 deletions docs/functions/downloadFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@

# Function: downloadFile()

## downloadFile(fileUrl, requestInit)

```ts
function downloadFile(fileUrl, requestInit?): FetchTask<DownloadFileTempResponse>
```

Downloads a file from a URL and saves it to a temporary file.
The returned response will contain the temporary file path.

### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `fileUrl` | `string` | The URL of the file to download. |
| `requestInit`? | [`FsRequestInit`](../type-aliases/FsRequestInit.md) | Optional request initialization parameters. |

### Returns

`FetchTask`\<[`DownloadFileTempResponse`](../interfaces/DownloadFileTempResponse.md)\>

A task that can be aborted and contains the result of the download.

### Defined in

[fs/opfs\_download.ts:17](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_download.ts#L17)

## downloadFile(fileUrl, filePath, requestInit)

```ts
function downloadFile(
fileUrl,
Expand All @@ -15,20 +43,20 @@ requestInit?): FetchTask<Response>

Downloads a file from a URL and saves it to the specified path.

## Parameters
### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `fileUrl` | `string` | The URL of the file to download. |
| `filePath` | `string` | The path where the downloaded file will be saved. |
| `requestInit`? | [`FsRequestInit`](../type-aliases/FsRequestInit.md) | Optional request initialization parameters. |

## Returns
### Returns

`FetchTask`\<`Response`\>

A promise that resolves to an `AsyncIOResult` indicating whether the file was successfully downloaded and saved.
A task that can be aborted and contains the result of the download.

## Defined in
### Defined in

[fs/opfs\_download.ts:16](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_download.ts#L16)
[fs/opfs\_download.ts:26](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_download.ts#L26)
2 changes: 1 addition & 1 deletion docs/functions/emptyDir.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the directory w

## Defined in

[fs/opfs\_ext.ts:128](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_ext.ts#L128)
[fs/opfs\_ext.ts:128](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_ext.ts#L128)
2 changes: 1 addition & 1 deletion docs/functions/emptyDirSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Sync version of `emptyDir`.

## Defined in

[worker/opfs\_worker\_adapter.ts:200](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L200)
[worker/opfs\_worker\_adapter.ts:200](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L200)
2 changes: 1 addition & 1 deletion docs/functions/exists.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the file or dir

## Defined in

[fs/opfs\_ext.ts:156](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_ext.ts#L156)
[fs/opfs\_ext.ts:156](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_ext.ts#L156)
2 changes: 1 addition & 1 deletion docs/functions/existsSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Sync version of `exists`.

## Defined in

[worker/opfs\_worker\_adapter.ts:207](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L207)
[worker/opfs\_worker\_adapter.ts:207](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L207)
2 changes: 1 addition & 1 deletion docs/functions/generateTempPath.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ The temporary path.

## Defined in

[fs/opfs\_tmp.ts:15](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_tmp.ts#L15)
[fs/utils.ts:11](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/utils.ts#L11)
2 changes: 1 addition & 1 deletion docs/functions/getFileDataByHandle.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ A promise that resolves to the data of the file.

## Defined in

[fs/utils.ts:66](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/utils.ts#L66)
[fs/utils.ts:97](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/utils.ts#L97)
2 changes: 1 addition & 1 deletion docs/functions/isDirectoryHandle.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Whether the handle is a directory.

## Defined in

[fs/utils.ts:48](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/utils.ts#L48)
[fs/utils.ts:79](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/utils.ts#L79)
2 changes: 1 addition & 1 deletion docs/functions/isFileHandle.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Whether the handle is a file.

## Defined in

[fs/utils.ts:39](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/utils.ts#L39)
[fs/utils.ts:70](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/utils.ts#L70)
2 changes: 1 addition & 1 deletion docs/functions/isFileHandleLike.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Whether the handle is a file-like.

## Defined in

[fs/utils.ts:57](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/utils.ts#L57)
[fs/utils.ts:88](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/utils.ts#L88)
2 changes: 1 addition & 1 deletion docs/functions/isOPFSSupported.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ A boolean indicating whether OPFS is supported.

## Defined in

[fs/support.ts:6](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/support.ts#L6)
[fs/support.ts:6](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/support.ts#L6)
29 changes: 29 additions & 0 deletions docs/functions/isTempPath.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[**happy-opfs**](../README.md)**Docs**

***

[happy-opfs](../README.md) / isTempPath

# Function: isTempPath()

```ts
function isTempPath(path): boolean
```

Check whether the path is a temporary path.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `path` | `string` | The path to check. |

## Returns

`boolean`

`true` if the path is a temporary path otherwise `false`.

## Defined in

[fs/utils.ts:30](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/utils.ts#L30)
2 changes: 1 addition & 1 deletion docs/functions/mkTemp.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ A promise that resolves the result of the temporary file or directory path.

## Defined in

[fs/opfs\_tmp.ts:35](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_tmp.ts#L35)
[fs/opfs\_tmp.ts:14](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_tmp.ts#L14)
2 changes: 1 addition & 1 deletion docs/functions/mkTempSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Sync version of `mkTemp`.

## Defined in

[worker/opfs\_worker\_adapter.ts:221](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L221)
[worker/opfs\_worker\_adapter.ts:221](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L221)
2 changes: 1 addition & 1 deletion docs/functions/mkdir.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the directory w

## Defined in

[fs/opfs\_core.ts:31](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_core.ts#L31)
[fs/opfs\_core.ts:31](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_core.ts#L31)
2 changes: 1 addition & 1 deletion docs/functions/mkdirSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Sync version of `mkdir`.

## Defined in

[worker/opfs\_worker\_adapter.ts:97](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L97)
[worker/opfs\_worker\_adapter.ts:97](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L97)
2 changes: 1 addition & 1 deletion docs/functions/pruneTemp.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ A promise that resolves to an `AsyncVoidIOResult` indicating whether the tempora

## Defined in

[fs/opfs\_tmp.ts:59](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_tmp.ts#L59)
[fs/opfs\_tmp.ts:38](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_tmp.ts#L38)
2 changes: 1 addition & 1 deletion docs/functions/pruneTempSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Sync version of `pruneTemp`.

## Defined in

[worker/opfs\_worker\_adapter.ts:228](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L228)
[worker/opfs\_worker\_adapter.ts:228](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L228)
2 changes: 1 addition & 1 deletion docs/functions/readBlobFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ A promise that resolves to an `AsyncIOResult` containing the file content as a F

## Defined in

[fs/opfs\_ext.ts:180](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_ext.ts#L180)
[fs/opfs\_ext.ts:180](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_ext.ts#L180)
2 changes: 1 addition & 1 deletion docs/functions/readBlobFileSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Sync version of `readBlobFile`.

## Defined in

[worker/opfs\_worker\_adapter.ts:235](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L235)
[worker/opfs\_worker\_adapter.ts:235](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L235)
2 changes: 1 addition & 1 deletion docs/functions/readDir.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ A promise that resolves to an `AsyncIOResult` containing an async iterable itera

## Defined in

[fs/opfs\_core.ts:48](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_core.ts#L48)
[fs/opfs\_core.ts:48](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_core.ts#L48)
2 changes: 1 addition & 1 deletion docs/functions/readDirSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Sync version of `readDir`.

## Defined in

[worker/opfs\_worker\_adapter.ts:104](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L104)
[worker/opfs\_worker\_adapter.ts:104](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L104)
6 changes: 3 additions & 3 deletions docs/functions/readFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Optional read options.

### Defined in

[fs/opfs\_core.ts:80](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_core.ts#L80)
[fs/opfs\_core.ts:80](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_core.ts#L80)

## readFile(filePath, options)

Expand Down Expand Up @@ -96,7 +96,7 @@ Optional read options.

### Defined in

[fs/opfs\_core.ts:91](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_core.ts#L91)
[fs/opfs\_core.ts:91](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_core.ts#L91)

## readFile(filePath, options)

Expand Down Expand Up @@ -135,4 +135,4 @@ Optional read options.

### Defined in

[fs/opfs\_core.ts:102](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_core.ts#L102)
[fs/opfs\_core.ts:102](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_core.ts#L102)
6 changes: 3 additions & 3 deletions docs/functions/readFileSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Sync version of `readFile`.

### Defined in

[worker/opfs\_worker\_adapter.ts:111](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L111)
[worker/opfs\_worker\_adapter.ts:111](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L111)

## readFileSync(filePath, options)

Expand All @@ -48,7 +48,7 @@ function readFileSync(filePath, options): IOResult<string>

### Defined in

[worker/opfs\_worker\_adapter.ts:114](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L114)
[worker/opfs\_worker\_adapter.ts:114](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L114)

## readFileSync(filePath, options)

Expand All @@ -69,4 +69,4 @@ function readFileSync(filePath, options?): IOResult<ArrayBuffer>

### Defined in

[worker/opfs\_worker\_adapter.ts:117](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/worker/opfs_worker_adapter.ts#L117)
[worker/opfs\_worker\_adapter.ts:117](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/worker/opfs_worker_adapter.ts#L117)
2 changes: 1 addition & 1 deletion docs/functions/readTextFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ A promise that resolves to an `AsyncIOResult` containing the file content as a s

## Defined in

[fs/opfs\_ext.ts:192](https://github.com/JiangJie/happy-opfs/blob/6e8cfb02baa55aecdbfe9b09b83e8895a321cf4e/src/fs/opfs_ext.ts#L192)
[fs/opfs\_ext.ts:192](https://github.com/JiangJie/happy-opfs/blob/a6314c4612c605f77895adcb9d6d91abcaafaa7d/src/fs/opfs_ext.ts#L192)
Loading

0 comments on commit 6c7b7ec

Please sign in to comment.