mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
* split tauri into 3 crates * fix macros * change builder into lib * cleanup package paths * add features back to lib * make build function public * add build-deps * rename and fix. * correct package name * move crates to root and refactor names * fix github action * move fixture to tauri-build * remove slash * add .vscode features * fix updater * fix updater mistake * fix(tauri) refactor buiilds * fix seperation * change get back to get * fix cfg and remove dead code warnings. * roll #160 into this pr * add credit * fix eof * chore(tauri) move assets to mod, loadAssets cfg outside its definition * chore(tauri) remove unused deps * update updater and cfg * fix(tauri) embedded-server with dead variable * add review refactors and remove cli form workgroup * chore(tauri) rename tauri to tauri-api and tauri-bundle to tauri * fix workspace and updater * rename update to updater
20 lines
385 B
Rust
20 lines
385 B
Rust
use std::fs;
|
|
|
|
mod error;
|
|
mod extract;
|
|
mod file_move;
|
|
|
|
pub use error::Error;
|
|
pub use extract::*;
|
|
pub use file_move::*;
|
|
|
|
pub fn read_string(file: String) -> Result<String, String> {
|
|
fs::read_to_string(file)
|
|
.map_err(|err| err.to_string())
|
|
.map(|c| c)
|
|
}
|
|
|
|
pub fn read_binary(file: String) -> Result<Vec<u8>, String> {
|
|
fs::read(file).map_err(|err| err.to_string()).map(|b| b)
|
|
}
|