Files
gamewhale 589ff15213 chore: 初始化 BlockFlow Workbench 仓库
建立前端与 Tauri 桌面端的首个版本提交,包含核心编辑器、项目文件读写、测试与构建配置。

补充 Git 忽略规则和换行规范,排除依赖、构建产物、本地运行日志与临时验证文件,方便在其他电脑继续开发。
2026-05-29 17:23:43 +08:00

20 lines
584 B
Rust

use std::path::PathBuf;
use tauri_plugin_fs::FsExt;
#[tauri::command]
fn allow_project_directory(app: tauri::AppHandle, path: String) -> Result<(), String> {
app.fs_scope()
.allow_directory(PathBuf::from(path), true)
.map_err(|error| error.to_string())
}
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_fs::init())
.invoke_handler(tauri::generate_handler![allow_project_directory])
.run(tauri::generate_context!())
.expect("error while running BlockFlow Workbench");
}