From d3d7eb32262d4c97fc5ffe6337004ea69c6b91fa Mon Sep 17 00:00:00 2001 From: jarvisjiang Date: Tue, 13 Aug 2024 10:14:31 +0000 Subject: [PATCH] update docs --- docs/README.md | 2 ++ docs/functions/appendFile.md | 2 +- docs/functions/appendFileSync.md | 2 +- docs/functions/assertAbsolutePath.md | 2 +- docs/functions/assertFileUrl.md | 2 +- docs/functions/connectSyncAgent.md | 2 +- docs/functions/copy.md | 2 +- docs/functions/copySync.md | 2 +- docs/functions/createFile.md | 2 +- docs/functions/createFileSync.md | 2 +- docs/functions/deleteTemp.md | 2 +- docs/functions/deleteTempSync.md | 2 +- docs/functions/downloadFile.md | 4 +-- docs/functions/emptyDir.md | 2 +- docs/functions/emptyDirSync.md | 2 +- docs/functions/exists.md | 2 +- docs/functions/existsSync.md | 2 +- docs/functions/generateTempPath.md | 2 +- docs/functions/getFileDataByHandle.md | 2 +- docs/functions/isDirectoryHandle.md | 2 +- docs/functions/isFileHandle.md | 2 +- docs/functions/isFileHandleLike.md | 2 +- docs/functions/isOPFSSupported.md | 2 +- docs/functions/isTempPath.md | 2 +- docs/functions/mkTemp.md | 2 +- docs/functions/mkTempSync.md | 2 +- docs/functions/mkdir.md | 2 +- docs/functions/mkdirSync.md | 2 +- docs/functions/move.md | 2 +- docs/functions/moveSync.md | 2 +- docs/functions/pruneTemp.md | 2 +- docs/functions/pruneTempSync.md | 2 +- docs/functions/readBlobFile.md | 2 +- docs/functions/readBlobFileSync.md | 2 +- docs/functions/readDir.md | 2 +- docs/functions/readDirSync.md | 2 +- docs/functions/readFile.md | 6 ++-- docs/functions/readFileSync.md | 6 ++-- docs/functions/readJsonFile.md | 35 +++++++++++++++++++++ docs/functions/readJsonFileSync.md | 33 +++++++++++++++++++ docs/functions/readTextFile.md | 2 +- docs/functions/readTextFileSync.md | 2 +- docs/functions/remove.md | 2 +- docs/functions/removeSync.md | 2 +- docs/functions/startSyncAgent.md | 2 +- docs/functions/stat.md | 2 +- docs/functions/statSync.md | 2 +- docs/functions/toFileSystemHandleLike.md | 2 +- docs/functions/unzip.md | 2 +- docs/functions/unzipFromUrl.md | 2 +- docs/functions/unzipSync.md | 2 +- docs/functions/uploadFile.md | 2 +- docs/functions/writeFile.md | 2 +- docs/functions/writeFileSync.md | 2 +- docs/functions/zip.md | 4 +-- docs/functions/zipFromUrl.md | 4 +-- docs/functions/zipSync.md | 4 +-- docs/interfaces/CopyOptions.md | 2 +- docs/interfaces/DownloadFileTempResponse.md | 4 +-- docs/interfaces/ErrorLike.md | 4 +-- docs/interfaces/ExistsOptions.md | 4 +-- docs/interfaces/FileLike.md | 10 +++--- docs/interfaces/FileSystemFileHandleLike.md | 10 +++--- docs/interfaces/FileSystemHandleLike.md | 4 +-- docs/interfaces/MoveOptions.md | 2 +- docs/interfaces/ReadDirEntry.md | 4 +-- docs/interfaces/ReadDirEntrySync.md | 4 +-- docs/interfaces/ReadDirOptions.md | 2 +- docs/interfaces/ReadOptions.md | 2 +- docs/interfaces/SyncAgentOptions.md | 6 ++-- docs/interfaces/TempOptions.md | 6 ++-- docs/interfaces/UploadRequestInit.md | 2 +- docs/interfaces/WriteOptions.md | 4 +-- docs/interfaces/ZipOptions.md | 2 +- docs/type-aliases/FileEncoding.md | 2 +- docs/type-aliases/FsRequestInit.md | 2 +- docs/type-aliases/ReadFileContent.md | 2 +- docs/type-aliases/WriteFileContent.md | 2 +- docs/type-aliases/WriteSyncFileContent.md | 2 +- docs/variables/CURRENT_DIR.md | 2 +- docs/variables/NOT_FOUND_ERROR.md | 2 +- docs/variables/ROOT_DIR.md | 2 +- docs/variables/TMP_DIR.md | 2 +- 83 files changed, 177 insertions(+), 107 deletions(-) create mode 100644 docs/functions/readJsonFile.md create mode 100644 docs/functions/readJsonFileSync.md diff --git a/docs/README.md b/docs/README.md index 7efd604..dc88fee 100644 --- a/docs/README.md +++ b/docs/README.md @@ -86,6 +86,8 @@ | [readDirSync](functions/readDirSync.md) | Sync version of `readDir`. | | [readFile](functions/readFile.md) | Reads the content of a file at the specified path as a File. | | [readFileSync](functions/readFileSync.md) | Sync version of `readFile`. | +| [readJsonFile](functions/readJsonFile.md) | Reads the content of a file at the specified path as a string and returns it as a JSON object. | +| [readJsonFileSync](functions/readJsonFileSync.md) | Sync version of `readJsonFile`. | | [readTextFile](functions/readTextFile.md) | Reads the content of a file at the specified path as a string. | | [readTextFileSync](functions/readTextFileSync.md) | Sync version of `readTextFile`. | | [remove](functions/remove.md) | Removes a file or directory at the specified path same as `rm -rf`. | diff --git a/docs/functions/appendFile.md b/docs/functions/appendFile.md index 65cc06a..fa7b4d4 100644 --- a/docs/functions/appendFile.md +++ b/docs/functions/appendFile.md @@ -27,4 +27,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the content was ## Defined in -[fs/opfs\_ext.ts:120](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_ext.ts#L120) +[fs/opfs\_ext.ts:120](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_ext.ts#L120) diff --git a/docs/functions/appendFileSync.md b/docs/functions/appendFileSync.md index 6f751ab..772e31c 100644 --- a/docs/functions/appendFileSync.md +++ b/docs/functions/appendFileSync.md @@ -25,4 +25,4 @@ Sync version of `appendFile`. ## Defined in -[worker/opfs\_worker\_adapter.ts:186](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L186) +[worker/opfs\_worker\_adapter.ts:186](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L186) diff --git a/docs/functions/assertAbsolutePath.md b/docs/functions/assertAbsolutePath.md index 5e4b356..04e3184 100644 --- a/docs/functions/assertAbsolutePath.md +++ b/docs/functions/assertAbsolutePath.md @@ -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/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/assertions.ts#L10) +[fs/assertions.ts:10](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/assertions.ts#L10) diff --git a/docs/functions/assertFileUrl.md b/docs/functions/assertFileUrl.md index a729fa3..da97364 100644 --- a/docs/functions/assertFileUrl.md +++ b/docs/functions/assertFileUrl.md @@ -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/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/assertions.ts#L21) +[fs/assertions.ts:21](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/assertions.ts#L21) diff --git a/docs/functions/connectSyncAgent.md b/docs/functions/connectSyncAgent.md index eb08df7..ed2ecb5 100644 --- a/docs/functions/connectSyncAgent.md +++ b/docs/functions/connectSyncAgent.md @@ -24,4 +24,4 @@ Communicate with worker. ## Defined in -[worker/opfs\_worker\_adapter.ts:17](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L17) +[worker/opfs\_worker\_adapter.ts:17](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L17) diff --git a/docs/functions/copy.md b/docs/functions/copy.md index d8cd0e1..5a78c94 100644 --- a/docs/functions/copy.md +++ b/docs/functions/copy.md @@ -33,4 +33,4 @@ A promise that resolves to an `AsyncVoidIOResult` indicating whether the file wa ## Defined in -[fs/opfs\_ext.ts:136](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_ext.ts#L136) +[fs/opfs\_ext.ts:136](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_ext.ts#L136) diff --git a/docs/functions/copySync.md b/docs/functions/copySync.md index abcf1e2..612537c 100644 --- a/docs/functions/copySync.md +++ b/docs/functions/copySync.md @@ -29,4 +29,4 @@ Sync version of `copy`. ## Defined in -[worker/opfs\_worker\_adapter.ts:193](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L193) +[worker/opfs\_worker\_adapter.ts:193](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L193) diff --git a/docs/functions/createFile.md b/docs/functions/createFile.md index 781ad95..1b24214 100644 --- a/docs/functions/createFile.md +++ b/docs/functions/createFile.md @@ -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/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_core.ts#L15) +[fs/opfs\_core.ts:15](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_core.ts#L15) diff --git a/docs/functions/createFileSync.md b/docs/functions/createFileSync.md index cff8097..c32f9fc 100644 --- a/docs/functions/createFileSync.md +++ b/docs/functions/createFileSync.md @@ -24,4 +24,4 @@ Sync version of `createFile`. ## Defined in -[worker/opfs\_worker\_adapter.ts:90](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L90) +[worker/opfs\_worker\_adapter.ts:90](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L90) diff --git a/docs/functions/deleteTemp.md b/docs/functions/deleteTemp.md index 804a4b8..75e36c0 100644 --- a/docs/functions/deleteTemp.md +++ b/docs/functions/deleteTemp.md @@ -20,4 +20,4 @@ A promise that resolves to an `AsyncVoidIOResult` indicating whether the tempora ## Defined in -[fs/opfs\_tmp.ts:29](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_tmp.ts#L29) +[fs/opfs\_tmp.ts:29](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_tmp.ts#L29) diff --git a/docs/functions/deleteTempSync.md b/docs/functions/deleteTempSync.md index e90edd9..3d33c31 100644 --- a/docs/functions/deleteTempSync.md +++ b/docs/functions/deleteTempSync.md @@ -18,4 +18,4 @@ Sync version of `deleteTemp`. ## Defined in -[worker/opfs\_worker\_adapter.ts:214](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L214) +[worker/opfs\_worker\_adapter.ts:214](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L214) diff --git a/docs/functions/downloadFile.md b/docs/functions/downloadFile.md index 80b462c..0f50f67 100644 --- a/docs/functions/downloadFile.md +++ b/docs/functions/downloadFile.md @@ -30,7 +30,7 @@ A task that can be aborted and contains the result of the download. ### Defined in -[fs/opfs\_download.ts:18](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_download.ts#L18) +[fs/opfs\_download.ts:18](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_download.ts#L18) ## downloadFile(fileUrl, filePath, requestInit) @@ -59,4 +59,4 @@ A task that can be aborted and contains the result of the download. ### Defined in -[fs/opfs\_download.ts:27](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_download.ts#L27) +[fs/opfs\_download.ts:27](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_download.ts#L27) diff --git a/docs/functions/emptyDir.md b/docs/functions/emptyDir.md index a48d3a5..ac548d0 100644 --- a/docs/functions/emptyDir.md +++ b/docs/functions/emptyDir.md @@ -26,4 +26,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the directory w ## Defined in -[fs/opfs\_ext.ts:152](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_ext.ts#L152) +[fs/opfs\_ext.ts:152](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_ext.ts#L152) diff --git a/docs/functions/emptyDirSync.md b/docs/functions/emptyDirSync.md index f842065..c5e410b 100644 --- a/docs/functions/emptyDirSync.md +++ b/docs/functions/emptyDirSync.md @@ -24,4 +24,4 @@ Sync version of `emptyDir`. ## Defined in -[worker/opfs\_worker\_adapter.ts:200](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L200) +[worker/opfs\_worker\_adapter.ts:200](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L200) diff --git a/docs/functions/exists.md b/docs/functions/exists.md index 865be47..d739822 100644 --- a/docs/functions/exists.md +++ b/docs/functions/exists.md @@ -27,4 +27,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the file or dir ## Defined in -[fs/opfs\_ext.ts:176](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_ext.ts#L176) +[fs/opfs\_ext.ts:176](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_ext.ts#L176) diff --git a/docs/functions/existsSync.md b/docs/functions/existsSync.md index 7dab824..07c1031 100644 --- a/docs/functions/existsSync.md +++ b/docs/functions/existsSync.md @@ -25,4 +25,4 @@ Sync version of `exists`. ## Defined in -[worker/opfs\_worker\_adapter.ts:207](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L207) +[worker/opfs\_worker\_adapter.ts:207](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L207) diff --git a/docs/functions/generateTempPath.md b/docs/functions/generateTempPath.md index 72b59be..f879d9c 100644 --- a/docs/functions/generateTempPath.md +++ b/docs/functions/generateTempPath.md @@ -26,4 +26,4 @@ The temporary path. ## Defined in -[fs/utils.ts:11](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/utils.ts#L11) +[fs/utils.ts:11](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/utils.ts#L11) diff --git a/docs/functions/getFileDataByHandle.md b/docs/functions/getFileDataByHandle.md index 6fd2f0d..37c9f28 100644 --- a/docs/functions/getFileDataByHandle.md +++ b/docs/functions/getFileDataByHandle.md @@ -26,4 +26,4 @@ A promise that resolves to the data of the file. ## Defined in -[fs/utils.ts:97](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/utils.ts#L97) +[fs/utils.ts:97](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/utils.ts#L97) diff --git a/docs/functions/isDirectoryHandle.md b/docs/functions/isDirectoryHandle.md index b2248ea..2b22ef2 100644 --- a/docs/functions/isDirectoryHandle.md +++ b/docs/functions/isDirectoryHandle.md @@ -26,4 +26,4 @@ Whether the handle is a directory. ## Defined in -[fs/utils.ts:79](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/utils.ts#L79) +[fs/utils.ts:79](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/utils.ts#L79) diff --git a/docs/functions/isFileHandle.md b/docs/functions/isFileHandle.md index 4cca151..1444ed0 100644 --- a/docs/functions/isFileHandle.md +++ b/docs/functions/isFileHandle.md @@ -26,4 +26,4 @@ Whether the handle is a file. ## Defined in -[fs/utils.ts:70](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/utils.ts#L70) +[fs/utils.ts:70](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/utils.ts#L70) diff --git a/docs/functions/isFileHandleLike.md b/docs/functions/isFileHandleLike.md index 33046be..4f4f6be 100644 --- a/docs/functions/isFileHandleLike.md +++ b/docs/functions/isFileHandleLike.md @@ -26,4 +26,4 @@ Whether the handle is a file-like. ## Defined in -[fs/utils.ts:88](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/utils.ts#L88) +[fs/utils.ts:88](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/utils.ts#L88) diff --git a/docs/functions/isOPFSSupported.md b/docs/functions/isOPFSSupported.md index 52f814d..52c5e45 100644 --- a/docs/functions/isOPFSSupported.md +++ b/docs/functions/isOPFSSupported.md @@ -20,4 +20,4 @@ A boolean indicating whether OPFS is supported. ## Defined in -[fs/support.ts:6](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/support.ts#L6) +[fs/support.ts:6](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/support.ts#L6) diff --git a/docs/functions/isTempPath.md b/docs/functions/isTempPath.md index 32b547d..4f581ba 100644 --- a/docs/functions/isTempPath.md +++ b/docs/functions/isTempPath.md @@ -26,4 +26,4 @@ Check whether the path is a temporary path. ## Defined in -[fs/utils.ts:30](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/utils.ts#L30) +[fs/utils.ts:30](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/utils.ts#L30) diff --git a/docs/functions/mkTemp.md b/docs/functions/mkTemp.md index 031ec17..f5d0f57 100644 --- a/docs/functions/mkTemp.md +++ b/docs/functions/mkTemp.md @@ -26,4 +26,4 @@ A promise that resolves the result of the temporary file or directory path. ## Defined in -[fs/opfs\_tmp.ts:14](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_tmp.ts#L14) +[fs/opfs\_tmp.ts:14](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_tmp.ts#L14) diff --git a/docs/functions/mkTempSync.md b/docs/functions/mkTempSync.md index 0379df5..188e6f3 100644 --- a/docs/functions/mkTempSync.md +++ b/docs/functions/mkTempSync.md @@ -24,4 +24,4 @@ Sync version of `mkTemp`. ## Defined in -[worker/opfs\_worker\_adapter.ts:221](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L221) +[worker/opfs\_worker\_adapter.ts:221](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L221) diff --git a/docs/functions/mkdir.md b/docs/functions/mkdir.md index e961782..a2fc8c7 100644 --- a/docs/functions/mkdir.md +++ b/docs/functions/mkdir.md @@ -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/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_core.ts#L31) +[fs/opfs\_core.ts:31](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_core.ts#L31) diff --git a/docs/functions/mkdirSync.md b/docs/functions/mkdirSync.md index 6e7f176..3766ad9 100644 --- a/docs/functions/mkdirSync.md +++ b/docs/functions/mkdirSync.md @@ -24,4 +24,4 @@ Sync version of `mkdir`. ## Defined in -[worker/opfs\_worker\_adapter.ts:97](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L97) +[worker/opfs\_worker\_adapter.ts:97](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L97) diff --git a/docs/functions/move.md b/docs/functions/move.md index 9eb3a8a..68e2d1d 100644 --- a/docs/functions/move.md +++ b/docs/functions/move.md @@ -31,4 +31,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the file or dir ## Defined in -[fs/opfs\_ext.ts:202](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_ext.ts#L202) +[fs/opfs\_ext.ts:202](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_ext.ts#L202) diff --git a/docs/functions/moveSync.md b/docs/functions/moveSync.md index 041496b..ec89252 100644 --- a/docs/functions/moveSync.md +++ b/docs/functions/moveSync.md @@ -29,4 +29,4 @@ Sync version of `move`. ## Defined in -[worker/opfs\_worker\_adapter.ts:104](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L104) +[worker/opfs\_worker\_adapter.ts:104](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L104) diff --git a/docs/functions/pruneTemp.md b/docs/functions/pruneTemp.md index 55fec9e..eff57c6 100644 --- a/docs/functions/pruneTemp.md +++ b/docs/functions/pruneTemp.md @@ -26,4 +26,4 @@ A promise that resolves to an `AsyncVoidIOResult` indicating whether the tempora ## Defined in -[fs/opfs\_tmp.ts:38](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_tmp.ts#L38) +[fs/opfs\_tmp.ts:38](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_tmp.ts#L38) diff --git a/docs/functions/pruneTempSync.md b/docs/functions/pruneTempSync.md index 7e07555..8e64e44 100644 --- a/docs/functions/pruneTempSync.md +++ b/docs/functions/pruneTempSync.md @@ -24,4 +24,4 @@ Sync version of `pruneTemp`. ## Defined in -[worker/opfs\_worker\_adapter.ts:228](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L228) +[worker/opfs\_worker\_adapter.ts:228](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L228) diff --git a/docs/functions/readBlobFile.md b/docs/functions/readBlobFile.md index b90645f..8702017 100644 --- a/docs/functions/readBlobFile.md +++ b/docs/functions/readBlobFile.md @@ -26,4 +26,4 @@ A promise that resolves to an `AsyncIOResult` containing the file content as a F ## Defined in -[fs/opfs\_ext.ts:219](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_ext.ts#L219) +[fs/opfs\_ext.ts:219](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_ext.ts#L219) diff --git a/docs/functions/readBlobFileSync.md b/docs/functions/readBlobFileSync.md index b67f9b6..e1c019d 100644 --- a/docs/functions/readBlobFileSync.md +++ b/docs/functions/readBlobFileSync.md @@ -24,4 +24,4 @@ Sync version of `readBlobFile`. ## Defined in -[worker/opfs\_worker\_adapter.ts:235](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L235) +[worker/opfs\_worker\_adapter.ts:235](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L235) diff --git a/docs/functions/readDir.md b/docs/functions/readDir.md index fd38748..0fb6ab2 100644 --- a/docs/functions/readDir.md +++ b/docs/functions/readDir.md @@ -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/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_core.ts#L48) +[fs/opfs\_core.ts:48](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_core.ts#L48) diff --git a/docs/functions/readDirSync.md b/docs/functions/readDirSync.md index fa33bc5..6254bf6 100644 --- a/docs/functions/readDirSync.md +++ b/docs/functions/readDirSync.md @@ -25,4 +25,4 @@ Sync version of `readDir`. ## Defined in -[worker/opfs\_worker\_adapter.ts:111](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L111) +[worker/opfs\_worker\_adapter.ts:111](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L111) diff --git a/docs/functions/readFile.md b/docs/functions/readFile.md index aca3d54..d487764 100644 --- a/docs/functions/readFile.md +++ b/docs/functions/readFile.md @@ -57,7 +57,7 @@ Optional read options. ### Defined in -[fs/opfs\_core.ts:80](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_core.ts#L80) +[fs/opfs\_core.ts:80](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_core.ts#L80) ## readFile(filePath, options) @@ -96,7 +96,7 @@ Optional read options. ### Defined in -[fs/opfs\_core.ts:91](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_core.ts#L91) +[fs/opfs\_core.ts:91](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_core.ts#L91) ## readFile(filePath, options) @@ -135,4 +135,4 @@ Optional read options. ### Defined in -[fs/opfs\_core.ts:102](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_core.ts#L102) +[fs/opfs\_core.ts:102](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_core.ts#L102) diff --git a/docs/functions/readFileSync.md b/docs/functions/readFileSync.md index f38259e..a8489a3 100644 --- a/docs/functions/readFileSync.md +++ b/docs/functions/readFileSync.md @@ -27,7 +27,7 @@ Sync version of `readFile`. ### Defined in -[worker/opfs\_worker\_adapter.ts:118](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L118) +[worker/opfs\_worker\_adapter.ts:118](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L118) ## readFileSync(filePath, options) @@ -48,7 +48,7 @@ function readFileSync(filePath, options): IOResult ### Defined in -[worker/opfs\_worker\_adapter.ts:121](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L121) +[worker/opfs\_worker\_adapter.ts:121](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L121) ## readFileSync(filePath, options) @@ -69,4 +69,4 @@ function readFileSync(filePath, options?): IOResult ### Defined in -[worker/opfs\_worker\_adapter.ts:124](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L124) +[worker/opfs\_worker\_adapter.ts:124](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L124) diff --git a/docs/functions/readJsonFile.md b/docs/functions/readJsonFile.md new file mode 100644 index 0000000..22f2af0 --- /dev/null +++ b/docs/functions/readJsonFile.md @@ -0,0 +1,35 @@ +[**happy-opfs**](../README.md) • **Docs** + +*** + +[happy-opfs](../README.md) / readJsonFile + +# Function: readJsonFile() + +```ts +function readJsonFile(filePath): AsyncIOResult +``` + +Reads the content of a file at the specified path as a string and returns it as a JSON object. + +## Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `filePath` | `string` | The path of the file to read. | + +## Returns + +`AsyncIOResult`\<`T`\> + +A promise that resolves to an `AsyncIOResult` containing the file content as a JSON object. + +## Defined in + +[fs/opfs\_ext.ts:231](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_ext.ts#L231) diff --git a/docs/functions/readJsonFileSync.md b/docs/functions/readJsonFileSync.md new file mode 100644 index 0000000..fa5af06 --- /dev/null +++ b/docs/functions/readJsonFileSync.md @@ -0,0 +1,33 @@ +[**happy-opfs**](../README.md) • **Docs** + +*** + +[happy-opfs](../README.md) / readJsonFileSync + +# Function: readJsonFileSync() + +```ts +function readJsonFileSync(filePath): IOResult +``` + +Sync version of `readJsonFile`. + +## Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `filePath` | `string` | + +## Returns + +`IOResult`\<`T`\> + +## Defined in + +[worker/opfs\_worker\_adapter.ts:244](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L244) diff --git a/docs/functions/readTextFile.md b/docs/functions/readTextFile.md index cabbcde..4825ab9 100644 --- a/docs/functions/readTextFile.md +++ b/docs/functions/readTextFile.md @@ -26,4 +26,4 @@ A promise that resolves to an `AsyncIOResult` containing the file content as a s ## Defined in -[fs/opfs\_ext.ts:231](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_ext.ts#L231) +[fs/opfs\_ext.ts:247](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_ext.ts#L247) diff --git a/docs/functions/readTextFileSync.md b/docs/functions/readTextFileSync.md index e1a403e..5d0d021 100644 --- a/docs/functions/readTextFileSync.md +++ b/docs/functions/readTextFileSync.md @@ -24,4 +24,4 @@ Sync version of `readTextFile`. ## Defined in -[worker/opfs\_worker\_adapter.ts:244](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L244) +[worker/opfs\_worker\_adapter.ts:257](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L257) diff --git a/docs/functions/remove.md b/docs/functions/remove.md index 5fe354c..9ff2bc1 100644 --- a/docs/functions/remove.md +++ b/docs/functions/remove.md @@ -26,4 +26,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the file or dir ## Defined in -[fs/opfs\_core.ts:143](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_core.ts#L143) +[fs/opfs\_core.ts:143](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_core.ts#L143) diff --git a/docs/functions/removeSync.md b/docs/functions/removeSync.md index 7a15e63..37622d9 100644 --- a/docs/functions/removeSync.md +++ b/docs/functions/removeSync.md @@ -24,4 +24,4 @@ Sync version of `remove`. ## Defined in -[worker/opfs\_worker\_adapter.ts:152](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L152) +[worker/opfs\_worker\_adapter.ts:152](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L152) diff --git a/docs/functions/startSyncAgent.md b/docs/functions/startSyncAgent.md index 6ef650b..4711eb9 100644 --- a/docs/functions/startSyncAgent.md +++ b/docs/functions/startSyncAgent.md @@ -20,4 +20,4 @@ Start runner loop. ## Defined in -[worker/opfs\_worker.ts:45](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker.ts#L45) +[worker/opfs\_worker.ts:45](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker.ts#L45) diff --git a/docs/functions/stat.md b/docs/functions/stat.md index da980a9..6a9b865 100644 --- a/docs/functions/stat.md +++ b/docs/functions/stat.md @@ -26,4 +26,4 @@ A promise that resolves to an `AsyncIOResult` containing the `FileSystemHandle`. ## Defined in -[fs/opfs\_core.ts:182](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_core.ts#L182) +[fs/opfs\_core.ts:182](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_core.ts#L182) diff --git a/docs/functions/statSync.md b/docs/functions/statSync.md index 870c9a9..240f3e9 100644 --- a/docs/functions/statSync.md +++ b/docs/functions/statSync.md @@ -24,4 +24,4 @@ Sync version of `stat`. ## Defined in -[worker/opfs\_worker\_adapter.ts:159](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L159) +[worker/opfs\_worker\_adapter.ts:159](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L159) diff --git a/docs/functions/toFileSystemHandleLike.md b/docs/functions/toFileSystemHandleLike.md index 0b75aed..3b69a48 100644 --- a/docs/functions/toFileSystemHandleLike.md +++ b/docs/functions/toFileSystemHandleLike.md @@ -26,4 +26,4 @@ Serializable version of FileSystemHandle that is FileSystemHandleLike. ## Defined in -[fs/utils.ts:39](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/utils.ts#L39) +[fs/utils.ts:39](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/utils.ts#L39) diff --git a/docs/functions/unzip.md b/docs/functions/unzip.md index a655967..e0cca0a 100644 --- a/docs/functions/unzip.md +++ b/docs/functions/unzip.md @@ -31,4 +31,4 @@ Use [fflate](https://github.com/101arrowz/fflate) as the unzip backend. ## Defined in -[fs/opfs\_unzip.ts:51](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_unzip.ts#L51) +[fs/opfs\_unzip.ts:51](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_unzip.ts#L51) diff --git a/docs/functions/unzipFromUrl.md b/docs/functions/unzipFromUrl.md index 66d7b66..bfaa0ff 100644 --- a/docs/functions/unzipFromUrl.md +++ b/docs/functions/unzipFromUrl.md @@ -36,4 +36,4 @@ Use [fflate](https://github.com/101arrowz/fflate) as the unzip backend. ## Defined in -[fs/opfs\_unzip.ts:71](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_unzip.ts#L71) +[fs/opfs\_unzip.ts:71](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_unzip.ts#L71) diff --git a/docs/functions/unzipSync.md b/docs/functions/unzipSync.md index 28c9c1a..ee6b6eb 100644 --- a/docs/functions/unzipSync.md +++ b/docs/functions/unzipSync.md @@ -25,4 +25,4 @@ Sync version of `unzip`. ## Defined in -[worker/opfs\_worker\_adapter.ts:253](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L253) +[worker/opfs\_worker\_adapter.ts:266](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L266) diff --git a/docs/functions/uploadFile.md b/docs/functions/uploadFile.md index 32d9856..0611f9c 100644 --- a/docs/functions/uploadFile.md +++ b/docs/functions/uploadFile.md @@ -31,4 +31,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the file was su ## Defined in -[fs/opfs\_upload.ts:17](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_upload.ts#L17) +[fs/opfs\_upload.ts:17](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_upload.ts#L17) diff --git a/docs/functions/writeFile.md b/docs/functions/writeFile.md index d154194..fb40c15 100644 --- a/docs/functions/writeFile.md +++ b/docs/functions/writeFile.md @@ -31,4 +31,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the file was su ## Defined in -[fs/opfs\_core.ts:217](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_core.ts#L217) +[fs/opfs\_core.ts:217](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_core.ts#L217) diff --git a/docs/functions/writeFileSync.md b/docs/functions/writeFileSync.md index bca958f..390c409 100644 --- a/docs/functions/writeFileSync.md +++ b/docs/functions/writeFileSync.md @@ -29,4 +29,4 @@ Sync version of `writeFile`. ## Defined in -[worker/opfs\_worker\_adapter.ts:179](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L179) +[worker/opfs\_worker\_adapter.ts:179](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L179) diff --git a/docs/functions/zip.md b/docs/functions/zip.md index 4d38a18..699e394 100644 --- a/docs/functions/zip.md +++ b/docs/functions/zip.md @@ -36,7 +36,7 @@ A promise that resolves to an `AsyncIOResult` indicating whether the source was ### Defined in -[fs/opfs\_zip.ts:49](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_zip.ts#L49) +[fs/opfs\_zip.ts:49](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_zip.ts#L49) ## zip(sourcePath, options) @@ -64,4 +64,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the source was ### Defined in -[fs/opfs\_zip.ts:60](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_zip.ts#L60) +[fs/opfs\_zip.ts:60](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_zip.ts#L60) diff --git a/docs/functions/zipFromUrl.md b/docs/functions/zipFromUrl.md index 8e03a70..97a99b4 100644 --- a/docs/functions/zipFromUrl.md +++ b/docs/functions/zipFromUrl.md @@ -35,7 +35,7 @@ A promise that resolves to an `AsyncIOResult` indicating whether the source was ### Defined in -[fs/opfs\_zip.ts:114](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_zip.ts#L114) +[fs/opfs\_zip.ts:114](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_zip.ts#L114) ## zipFromUrl(sourceUrl, requestInit) @@ -62,4 +62,4 @@ A promise that resolves to an `AsyncIOResult` indicating whether the source was ### Defined in -[fs/opfs\_zip.ts:124](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/opfs_zip.ts#L124) +[fs/opfs\_zip.ts:124](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/opfs_zip.ts#L124) diff --git a/docs/functions/zipSync.md b/docs/functions/zipSync.md index 7d4cf2a..931d26c 100644 --- a/docs/functions/zipSync.md +++ b/docs/functions/zipSync.md @@ -33,7 +33,7 @@ Sync version of `zip`. ### Defined in -[worker/opfs\_worker\_adapter.ts:260](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L260) +[worker/opfs\_worker\_adapter.ts:273](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L273) ## zipSync(sourcePath, options) @@ -56,4 +56,4 @@ Sync version of `zip`. ### Defined in -[worker/opfs\_worker\_adapter.ts:265](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/worker/opfs_worker_adapter.ts#L265) +[worker/opfs\_worker\_adapter.ts:278](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/worker/opfs_worker_adapter.ts#L278) diff --git a/docs/interfaces/CopyOptions.md b/docs/interfaces/CopyOptions.md index 00c4835..6173f46 100644 --- a/docs/interfaces/CopyOptions.md +++ b/docs/interfaces/CopyOptions.md @@ -12,4 +12,4 @@ Options for `copy`. | Property | Type | Default value | Description | Defined in | | ------ | ------ | ------ | ------ | ------ | -| `overwrite?` | `boolean` | `true` | Whether to overwrite the destination file if it already exists. | [fs/defines.ts:264](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L264) | +| `overwrite?` | `boolean` | `true` | Whether to overwrite the destination file if it already exists. | [fs/defines.ts:264](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L264) | diff --git a/docs/interfaces/DownloadFileTempResponse.md b/docs/interfaces/DownloadFileTempResponse.md index 4fe80ec..c819002 100644 --- a/docs/interfaces/DownloadFileTempResponse.md +++ b/docs/interfaces/DownloadFileTempResponse.md @@ -12,5 +12,5 @@ Result of `downloadFile` when the file is saved to a temporary path. | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| `rawResponse` | `Response` | The raw response. | [fs/defines.ts:279](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L279) | -| `tempFilePath` | `string` | The temporary path of the downloaded file to be saved. | [fs/defines.ts:274](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L274) | +| `rawResponse` | `Response` | The raw response. | [fs/defines.ts:279](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L279) | +| `tempFilePath` | `string` | The temporary path of the downloaded file to be saved. | [fs/defines.ts:274](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L274) | diff --git a/docs/interfaces/ErrorLike.md b/docs/interfaces/ErrorLike.md index 61a3cc6..52c3dad 100644 --- a/docs/interfaces/ErrorLike.md +++ b/docs/interfaces/ErrorLike.md @@ -12,5 +12,5 @@ Serializable version of Error. | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| `message` | `string` | The message of the error. | [fs/defines.ts:167](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L167) | -| `name` | `string` | The name of the error. | [fs/defines.ts:162](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L162) | +| `message` | `string` | The message of the error. | [fs/defines.ts:167](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L167) | +| `name` | `string` | The name of the error. | [fs/defines.ts:162](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L162) | diff --git a/docs/interfaces/ExistsOptions.md b/docs/interfaces/ExistsOptions.md index 96cb925..ad79ae2 100644 --- a/docs/interfaces/ExistsOptions.md +++ b/docs/interfaces/ExistsOptions.md @@ -12,5 +12,5 @@ Options to determine the existence of a file or directory. | Property | Type | Default value | Description | Defined in | | ------ | ------ | ------ | ------ | ------ | -| `isDirectory?` | `boolean` | `false` | Whether to check for the existence of a directory. | [fs/defines.ts:54](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L54) | -| `isFile?` | `boolean` | `false` | Whether to check for the existence of a file. | [fs/defines.ts:60](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L60) | +| `isDirectory?` | `boolean` | `false` | Whether to check for the existence of a directory. | [fs/defines.ts:54](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L54) | +| `isFile?` | `boolean` | `false` | Whether to check for the existence of a file. | [fs/defines.ts:60](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L60) | diff --git a/docs/interfaces/FileLike.md b/docs/interfaces/FileLike.md index 9a3e7da..1fa7913 100644 --- a/docs/interfaces/FileLike.md +++ b/docs/interfaces/FileLike.md @@ -12,8 +12,8 @@ Serializable version of File. | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| `data` | `ArrayBuffer` | The binary data of the file. | [fs/defines.ts:197](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L197) | -| `lastModified` | `number` | The last modified time of the file. | [fs/defines.ts:187](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L187) | -| `name` | `string` | The name of the file. | [fs/defines.ts:177](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L177) | -| `size` | `number` | The size of the file. | [fs/defines.ts:192](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L192) | -| `type` | `string` | The type of the file. | [fs/defines.ts:182](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L182) | +| `data` | `ArrayBuffer` | The binary data of the file. | [fs/defines.ts:197](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L197) | +| `lastModified` | `number` | The last modified time of the file. | [fs/defines.ts:187](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L187) | +| `name` | `string` | The name of the file. | [fs/defines.ts:177](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L177) | +| `size` | `number` | The size of the file. | [fs/defines.ts:192](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L192) | +| `type` | `string` | The type of the file. | [fs/defines.ts:182](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L182) | diff --git a/docs/interfaces/FileSystemFileHandleLike.md b/docs/interfaces/FileSystemFileHandleLike.md index fb2df26..3d60ac4 100644 --- a/docs/interfaces/FileSystemFileHandleLike.md +++ b/docs/interfaces/FileSystemFileHandleLike.md @@ -16,8 +16,8 @@ A handle to a file or directory returned by `statSync`. | Property | Type | Description | Inherited from | Defined in | | ------ | ------ | ------ | ------ | ------ | -| `kind` | `FileSystemHandleKind` | The kind of the entry. | [`FileSystemHandleLike`](FileSystemHandleLike.md).`kind` | [fs/defines.ts:135](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L135) | -| `lastModified` | `number` | The last modified time of the file. | - | [fs/defines.ts:152](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L152) | -| `name` | `string` | The name of the entry. | [`FileSystemHandleLike`](FileSystemHandleLike.md).`name` | [fs/defines.ts:130](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L130) | -| `size` | `number` | The size of the file. | - | [fs/defines.ts:147](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L147) | -| `type` | `string` | The type of the file. | - | [fs/defines.ts:142](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L142) | +| `kind` | `FileSystemHandleKind` | The kind of the entry. | [`FileSystemHandleLike`](FileSystemHandleLike.md).`kind` | [fs/defines.ts:135](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L135) | +| `lastModified` | `number` | The last modified time of the file. | - | [fs/defines.ts:152](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L152) | +| `name` | `string` | The name of the entry. | [`FileSystemHandleLike`](FileSystemHandleLike.md).`name` | [fs/defines.ts:130](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L130) | +| `size` | `number` | The size of the file. | - | [fs/defines.ts:147](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L147) | +| `type` | `string` | The type of the file. | - | [fs/defines.ts:142](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L142) | diff --git a/docs/interfaces/FileSystemHandleLike.md b/docs/interfaces/FileSystemHandleLike.md index a5266ea..5808c0f 100644 --- a/docs/interfaces/FileSystemHandleLike.md +++ b/docs/interfaces/FileSystemHandleLike.md @@ -16,5 +16,5 @@ A handle to a file or directory returned by `statSync`. | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| `kind` | `FileSystemHandleKind` | The kind of the entry. | [fs/defines.ts:135](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L135) | -| `name` | `string` | The name of the entry. | [fs/defines.ts:130](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L130) | +| `kind` | `FileSystemHandleKind` | The kind of the entry. | [fs/defines.ts:135](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L135) | +| `name` | `string` | The name of the entry. | [fs/defines.ts:130](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L130) | diff --git a/docs/interfaces/MoveOptions.md b/docs/interfaces/MoveOptions.md index d00c75f..9164175 100644 --- a/docs/interfaces/MoveOptions.md +++ b/docs/interfaces/MoveOptions.md @@ -12,4 +12,4 @@ Options for `move`. | Property | Type | Default value | Description | Defined in | | ------ | ------ | ------ | ------ | ------ | -| `overwrite?` | `boolean` | `true` | Whether to overwrite the destination file if it already exists. | [fs/defines.ts:290](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L290) | +| `overwrite?` | `boolean` | `true` | Whether to overwrite the destination file if it already exists. | [fs/defines.ts:290](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L290) | diff --git a/docs/interfaces/ReadDirEntry.md b/docs/interfaces/ReadDirEntry.md index df44a80..e0b4abd 100644 --- a/docs/interfaces/ReadDirEntry.md +++ b/docs/interfaces/ReadDirEntry.md @@ -12,5 +12,5 @@ An entry returned by `readDir`. | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| `handle` | `FileSystemHandle` | The handle of the entry. | [fs/defines.ts:105](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L105) | -| `path` | `string` | The relative path of the entry from readDir the path parameter. | [fs/defines.ts:100](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L100) | +| `handle` | `FileSystemHandle` | The handle of the entry. | [fs/defines.ts:105](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L105) | +| `path` | `string` | The relative path of the entry from readDir the path parameter. | [fs/defines.ts:100](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L100) | diff --git a/docs/interfaces/ReadDirEntrySync.md b/docs/interfaces/ReadDirEntrySync.md index 5e0f0be..78d84cf 100644 --- a/docs/interfaces/ReadDirEntrySync.md +++ b/docs/interfaces/ReadDirEntrySync.md @@ -12,5 +12,5 @@ An entry returned by `readDirSync`. | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| `handle` | [`FileSystemHandleLike`](FileSystemHandleLike.md) | The handle of the entry. | [fs/defines.ts:120](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L120) | -| `path` | `string` | The relative path of the entry from readDir the path parameter. | [fs/defines.ts:115](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L115) | +| `handle` | [`FileSystemHandleLike`](FileSystemHandleLike.md) | The handle of the entry. | [fs/defines.ts:120](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L120) | +| `path` | `string` | The relative path of the entry from readDir the path parameter. | [fs/defines.ts:115](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L115) | diff --git a/docs/interfaces/ReadDirOptions.md b/docs/interfaces/ReadDirOptions.md index 99c1ca1..3d21201 100644 --- a/docs/interfaces/ReadDirOptions.md +++ b/docs/interfaces/ReadDirOptions.md @@ -12,4 +12,4 @@ Options for reading directories. | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| `recursive` | `boolean` | Whether to recursively read the contents of directories. | [fs/defines.ts:90](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L90) | +| `recursive` | `boolean` | Whether to recursively read the contents of directories. | [fs/defines.ts:90](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L90) | diff --git a/docs/interfaces/ReadOptions.md b/docs/interfaces/ReadOptions.md index 5f71934..c8255a9 100644 --- a/docs/interfaces/ReadOptions.md +++ b/docs/interfaces/ReadOptions.md @@ -12,4 +12,4 @@ Options for reading files with specified encoding. | Property | Type | Default value | Description | Defined in | | ------ | ------ | ------ | ------ | ------ | -| `encoding?` | [`FileEncoding`](../type-aliases/FileEncoding.md) | `'binary'` | The encoding to use for reading the file's content. | [fs/defines.ts:26](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L26) | +| `encoding?` | [`FileEncoding`](../type-aliases/FileEncoding.md) | `'binary'` | The encoding to use for reading the file's content. | [fs/defines.ts:26](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L26) | diff --git a/docs/interfaces/SyncAgentOptions.md b/docs/interfaces/SyncAgentOptions.md index 0d3307a..a8b7d7f 100644 --- a/docs/interfaces/SyncAgentOptions.md +++ b/docs/interfaces/SyncAgentOptions.md @@ -12,6 +12,6 @@ Setup options of `connectSyncAgent`. | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| `bufferLength?` | `number` | The length of the buffer to use for communication. | [fs/defines.ts:212](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L212) | -| `opTimeout?` | `number` | The timeout for operations. | [fs/defines.ts:217](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L217) | -| `worker` | `string` \| `Worker` \| `URL` | The worker to communicate with. | [fs/defines.ts:207](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L207) | +| `bufferLength?` | `number` | The length of the buffer to use for communication. | [fs/defines.ts:212](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L212) | +| `opTimeout?` | `number` | The timeout for operations. | [fs/defines.ts:217](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L217) | +| `worker` | `string` \| `Worker` \| `URL` | The worker to communicate with. | [fs/defines.ts:207](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L207) | diff --git a/docs/interfaces/TempOptions.md b/docs/interfaces/TempOptions.md index d4c1844..7199fc0 100644 --- a/docs/interfaces/TempOptions.md +++ b/docs/interfaces/TempOptions.md @@ -12,6 +12,6 @@ Options for `mkTemp`. | Property | Type | Default value | Description | Defined in | | ------ | ------ | ------ | ------ | ------ | -| `basename?` | `string` | `tmp` | The basename of the file or directory. eg: `mktemp -t basename.XXX` | [fs/defines.ts:247](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L247) | -| `extname?` | `string` | `undefined` | The extension of the file. eg: `mktemp --suffix .txt` | [fs/defines.ts:253](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L253) | -| `isDirectory?` | `boolean` | `false` | Whether to create a directory. eg: `mktemp -d` | [fs/defines.ts:240](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L240) | +| `basename?` | `string` | `tmp` | The basename of the file or directory. eg: `mktemp -t basename.XXX` | [fs/defines.ts:247](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L247) | +| `extname?` | `string` | `undefined` | The extension of the file. eg: `mktemp --suffix .txt` | [fs/defines.ts:253](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L253) | +| `isDirectory?` | `boolean` | `false` | Whether to create a directory. eg: `mktemp -d` | [fs/defines.ts:240](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L240) | diff --git a/docs/interfaces/UploadRequestInit.md b/docs/interfaces/UploadRequestInit.md index 8b9f5b1..ba32eee 100644 --- a/docs/interfaces/UploadRequestInit.md +++ b/docs/interfaces/UploadRequestInit.md @@ -16,4 +16,4 @@ fetch-t request options for uploading files. | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| `filename?` | `string` | The filename to use when uploading the file. | [fs/defines.ts:80](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L80) | +| `filename?` | `string` | The filename to use when uploading the file. | [fs/defines.ts:80](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L80) | diff --git a/docs/interfaces/WriteOptions.md b/docs/interfaces/WriteOptions.md index f116dc1..3d4c19c 100644 --- a/docs/interfaces/WriteOptions.md +++ b/docs/interfaces/WriteOptions.md @@ -12,5 +12,5 @@ Options for writing files, including flags for creation and appending. | Property | Type | Default value | Description | Defined in | | ------ | ------ | ------ | ------ | ------ | -| `append?` | `boolean` | `false` | Whether to append to the file if it already exists. | [fs/defines.ts:43](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L43) | -| `create?` | `boolean` | `true` | Whether to create the file if it does not exist. | [fs/defines.ts:37](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L37) | +| `append?` | `boolean` | `false` | Whether to append to the file if it already exists. | [fs/defines.ts:43](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L43) | +| `create?` | `boolean` | `true` | Whether to create the file if it does not exist. | [fs/defines.ts:37](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L37) | diff --git a/docs/interfaces/ZipOptions.md b/docs/interfaces/ZipOptions.md index 4324337..942faee 100644 --- a/docs/interfaces/ZipOptions.md +++ b/docs/interfaces/ZipOptions.md @@ -12,4 +12,4 @@ Options for `zip`. | Property | Type | Default value | Description | Defined in | | ------ | ------ | ------ | ------ | ------ | -| `preserveRoot` | `boolean` | `true` | Whether to preserve the root directory in the zip file. | [fs/defines.ts:228](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L228) | +| `preserveRoot` | `boolean` | `true` | Whether to preserve the root directory in the zip file. | [fs/defines.ts:228](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L228) | diff --git a/docs/type-aliases/FileEncoding.md b/docs/type-aliases/FileEncoding.md index e1c15df..6261e71 100644 --- a/docs/type-aliases/FileEncoding.md +++ b/docs/type-aliases/FileEncoding.md @@ -14,4 +14,4 @@ Supported file encodings for reading and writing files. ## Defined in -[fs/defines.ts:66](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L66) +[fs/defines.ts:66](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L66) diff --git a/docs/type-aliases/FsRequestInit.md b/docs/type-aliases/FsRequestInit.md index 8e5b527..ca4798a 100644 --- a/docs/type-aliases/FsRequestInit.md +++ b/docs/type-aliases/FsRequestInit.md @@ -14,4 +14,4 @@ fetch-t options for download and upload. ## Defined in -[fs/defines.ts:71](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L71) +[fs/defines.ts:71](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L71) diff --git a/docs/type-aliases/ReadFileContent.md b/docs/type-aliases/ReadFileContent.md index 9d8e8b3..fd8a4e6 100644 --- a/docs/type-aliases/ReadFileContent.md +++ b/docs/type-aliases/ReadFileContent.md @@ -14,4 +14,4 @@ Represents the possible content types that can be read from a file. ## Defined in -[fs/defines.ts:16](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L16) +[fs/defines.ts:16](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L16) diff --git a/docs/type-aliases/WriteFileContent.md b/docs/type-aliases/WriteFileContent.md index 6d55ec4..fe85f2f 100644 --- a/docs/type-aliases/WriteFileContent.md +++ b/docs/type-aliases/WriteFileContent.md @@ -14,4 +14,4 @@ Represents the possible content types that can be written to a file. ## Defined in -[fs/defines.ts:6](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L6) +[fs/defines.ts:6](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L6) diff --git a/docs/type-aliases/WriteSyncFileContent.md b/docs/type-aliases/WriteSyncFileContent.md index b47d4b2..2936d17 100644 --- a/docs/type-aliases/WriteSyncFileContent.md +++ b/docs/type-aliases/WriteSyncFileContent.md @@ -14,4 +14,4 @@ Represents the possible content types that can be written synchronously to a fil ## Defined in -[fs/defines.ts:11](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/defines.ts#L11) +[fs/defines.ts:11](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/defines.ts#L11) diff --git a/docs/variables/CURRENT_DIR.md b/docs/variables/CURRENT_DIR.md index 004ef66..3b4ce96 100644 --- a/docs/variables/CURRENT_DIR.md +++ b/docs/variables/CURRENT_DIR.md @@ -14,4 +14,4 @@ A constant representing the current directory path. ## Defined in -[fs/constants.ts:17](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/constants.ts#L17) +[fs/constants.ts:17](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/constants.ts#L17) diff --git a/docs/variables/NOT_FOUND_ERROR.md b/docs/variables/NOT_FOUND_ERROR.md index a2c70dc..0c75d38 100644 --- a/docs/variables/NOT_FOUND_ERROR.md +++ b/docs/variables/NOT_FOUND_ERROR.md @@ -15,4 +15,4 @@ Name of DOMException.NOT_FOUND_ERR. ## Defined in -[fs/constants.ts:7](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/constants.ts#L7) +[fs/constants.ts:7](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/constants.ts#L7) diff --git a/docs/variables/ROOT_DIR.md b/docs/variables/ROOT_DIR.md index 53ae9ad..5a2c00c 100644 --- a/docs/variables/ROOT_DIR.md +++ b/docs/variables/ROOT_DIR.md @@ -14,4 +14,4 @@ A constant representing the root directory path. ## Defined in -[fs/constants.ts:12](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/constants.ts#L12) +[fs/constants.ts:12](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/constants.ts#L12) diff --git a/docs/variables/TMP_DIR.md b/docs/variables/TMP_DIR.md index 0247fb4..ca3d661 100644 --- a/docs/variables/TMP_DIR.md +++ b/docs/variables/TMP_DIR.md @@ -14,4 +14,4 @@ A constant representing the temporary directory path. ## Defined in -[fs/constants.ts:22](https://github.com/JiangJie/happy-opfs/blob/1fc39add615fcd3c1ee38b13edeb0d38cd3481c4/src/fs/constants.ts#L22) +[fs/constants.ts:22](https://github.com/JiangJie/happy-opfs/blob/41bfb9280ee562c4a8708809308f96d116edb112/src/fs/constants.ts#L22)