Apographe/src-tauri/src/file_access.rs

13 lines
387 B
Rust

// #[tauri::command]
// pub fn open_file(app_handle: tauri::AppHandle, relative_path: String) -> Option<String> {
// let mut file = File::open("foo.txt")?;
// let mut contents = String::new();
// file.read_to_string(&mut contents)?;
// assert_eq!(contents, "Hello, world!");
// Ok(())
// }
use std::{path::Path, sync::Mutex};
use crate::Config;
use tauri::Manager;