@@ -26,52 +26,53 @@ Install the fs plugin to get started.
2626<Tabs >
2727 <TabItem label = " Automatic" >
2828
29- Use your project's package manager to add the dependency:
30-
31- { ' ' }
32-
33- <CommandTabs
34- npm = " npm run tauri add fs"
35- yarn = " yarn run tauri add fs"
36- pnpm = " pnpm tauri add fs"
37- cargo = " cargo tauri add fs"
38- />
39-
40- </TabItem >
41- <TabItem label = " Manual" >
42- <Steps >
43-
44- 1. Install the fs plugin by adding the following to your ` Cargo.toml ` file:
45-
46- ``` toml title="src-tauri/Cargo.toml"
47- [dependencies ]
48- tauri-plugin-fs = " 2.0.0-beta"
49- # alternatively with Git:
50- tauri-plugin-fs = { git = " https://github.com/tauri-apps/plugins-workspace" , branch = " v2" }
51- ```
52-
53- 2. Modify ` lib.rs ` to initialize the plugin:
54-
55- ``` rust title="src-tauri/src/lib.rs" ins={4}
56- #[cfg_attr(mobile, tauri:: mobile_entry_point)]
57- fn run () {
58- tauri :: Builder :: default ()
59- . plugin (tauri_plugin_fs :: init ())
60- . run (tauri :: generate_context! ())
61- . expect (" error while running tauri application" );
62- }
63- ```
64-
65- 3. Install the JavaScript Guest bindings using your preferred JavaScript package manager:
66-
67- <CommandTabs
68- npm = " npm install @tauri-apps/plugin-fs"
69- yarn = " yarn add @tauri-apps/plugin-fs"
70- pnpm = " pnpm add @tauri-apps/plugin-fs"
71- />
72-
73- </Steps >
74- </TabItem >
29+ Use your project's package manager to add the dependency:
30+
31+ { ' ' }
32+
33+ <CommandTabs
34+ npm = " npm run tauri add fs"
35+ yarn = " yarn run tauri add fs"
36+ pnpm = " pnpm tauri add fs"
37+ cargo = " cargo tauri add fs"
38+ />
39+
40+ </TabItem >
41+ <TabItem label = " Manual" >
42+ <Steps >
43+
44+ 1. Install the fs plugin by adding the following to your ` Cargo.toml ` file:
45+
46+ ``` toml title="src-tauri/Cargo.toml"
47+ [dependencies ]
48+ tauri-plugin-fs = " 2.0.0-beta"
49+ # alternatively with Git:
50+ tauri-plugin-fs = { git = " https://github.com/tauri-apps/plugins-workspace" , branch = " v2" }
51+ ```
52+
53+ 2. Modify ` lib.rs ` to initialize the plugin:
54+
55+ ``` rust title="src-tauri/src/lib.rs" ins={4}
56+ #[cfg_attr(mobile, tauri:: mobile_entry_point)]
57+ fn run () {
58+ tauri :: Builder :: default ()
59+ . plugin (tauri_plugin_fs :: init ())
60+ . run (tauri :: generate_context! ())
61+ . expect (" error while running tauri application" );
62+ }
63+ ```
64+
65+ 3. Install the JavaScript Guest bindings using your preferred JavaScript package manager:
66+
67+ <CommandTabs
68+ npm = " npm install @tauri-apps/plugin-fs"
69+ yarn = " yarn add @tauri-apps/plugin-fs"
70+ pnpm = " pnpm add @tauri-apps/plugin-fs"
71+ />
72+
73+ </Steps >
74+ </TabItem >
75+
7576</Tabs >
7677
7778## Usage
0 commit comments