#tauri-plugin #tauri-app #applications #structure #file-management #setup

sys tauri-plugin-structure-manager

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.

2 releases

0.3.8 Aug 7, 2024
0.3.7 Aug 6, 2024
0.3.5 Jul 29, 2024

#534 in Filesystem

Download history 26/week @ 2024-08-09 1/week @ 2024-08-16 2/week @ 2024-09-13 29/week @ 2024-09-27 1/week @ 2024-10-04

258 downloads per month

MIT license

32KB
536 lines

Tauri Plugin Structure Manager

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.

Features

  • Create and verify directory and file structures
  • Easily configurable through a JSON file
  • Integrates seamlessly with Tauri applications
  • Provides centralized management of project structures

Installation

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"

Usage

Rust

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.

Configuration

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": {}
              }
            }
          }
        }
      }
    }
  },

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Dependencies

~18–62MB
~892K SLoC