Crates.io | tauri-plugin-structure-manager |
lib.rs | tauri-plugin-structure-manager |
version | 0.3.8 |
source | src |
created_at | 2024-07-27 01:15:47.665294 |
updated_at | 2024-08-07 11:01:33.858446 |
description | A Tauri plugin for managing application structure, including directory and file creation and validation. This plugin helps ensure that the necessary project structure is maintained and allows for easy setup and verification of the application's file system. |
homepage | |
repository | https://github.com/HubioLabs/tauri-plugin-structure-manager |
max_upload_size | |
id | 1316939 |
size | 45,431 |
A Tauri plugin for managing application structure, including directory and file creation and validation. This plugin helps ensure that the necessary project structure is maintained and allows for easy setup and verification of the application's file system.
Run the following Cargo command in your project directory:
cargo add tauri-plugin-structure-manager@0.3.8
Or add the following line to your Cargo.toml
:
[dependencies]
tauri-plugin-structure-manager = "0.3.8"
In your Tauri application, register the plugin:
pub fn run() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![greet])
.plugin(tauri_plugin_structure_manager::init())
.setup(|app| {
app.verify_document()?;
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
You can call specific structure manager methodes from anywhere with an acces to the appHandle
.
You can configure the structure in the tauri.conf.json
.
"plugins": {
"structure_manager": {
"document": {
"files": [],
"dirs": {
"Hubio": {
"options": {
"repair": true
},
"files": [],
"dirs": {
"projects": {
"files": [],
"dirs": {}
}
}
}
}
}
}
},
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License. See the LICENSE file for more details.