Skip to content

Commit

Permalink
fix(fs): add options argument for exists function closes #734 (#744)
Browse files Browse the repository at this point in the history
closes #734
  • Loading branch information
amrbashir authored Nov 20, 2023
1 parent eea3df5 commit 88d260d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changes/fs-exists-2nd-arg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fs-js": "patch"
---

Add second argument to `exists` function to specify base directory.
4 changes: 2 additions & 2 deletions plugins/fs/guest-js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@ async function renameFile(
*
* @since 2.0.0
*/
async function exists(path: string): Promise<boolean> {
return await invoke("plugin:fs|exists", { path });
async function exists(path: string, options: FsOptions = {}): Promise<boolean> {
return await invoke("plugin:fs|exists", { path, options });
}

/**
Expand Down
2 changes: 1 addition & 1 deletion plugins/fs/src/api-iife.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 88d260d

Please sign in to comment.