|
|
|
@ -182,7 +182,7 @@ pub struct CopyFileOptions {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
pub fn copy_file<R: Runtime>(
|
|
|
|
|
pub async fn copy_file<R: Runtime>(
|
|
|
|
|
webview: Webview<R>,
|
|
|
|
|
global_scope: GlobalScope<Entry>,
|
|
|
|
|
command_scope: CommandScope<Entry>,
|
|
|
|
@ -291,7 +291,7 @@ fn read_dir_inner<P: AsRef<Path>>(path: P) -> crate::Result<Vec<DirEntry>> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
pub fn read_dir<R: Runtime>(
|
|
|
|
|
pub async fn read_dir<R: Runtime>(
|
|
|
|
|
webview: Webview<R>,
|
|
|
|
|
global_scope: GlobalScope<Entry>,
|
|
|
|
|
command_scope: CommandScope<Entry>,
|
|
|
|
@ -317,7 +317,7 @@ pub fn read_dir<R: Runtime>(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
pub fn read<R: Runtime>(
|
|
|
|
|
pub async fn read<R: Runtime>(
|
|
|
|
|
webview: Webview<R>,
|
|
|
|
|
rid: ResourceId,
|
|
|
|
|
len: u32,
|
|
|
|
@ -330,7 +330,7 @@ pub fn read<R: Runtime>(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
pub fn read_file<R: Runtime>(
|
|
|
|
|
pub async fn read_file<R: Runtime>(
|
|
|
|
|
webview: Webview<R>,
|
|
|
|
|
global_scope: GlobalScope<Entry>,
|
|
|
|
|
command_scope: CommandScope<Entry>,
|
|
|
|
@ -356,7 +356,7 @@ pub fn read_file<R: Runtime>(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
pub fn read_text_file<R: Runtime>(
|
|
|
|
|
pub async fn read_text_file<R: Runtime>(
|
|
|
|
|
webview: Webview<R>,
|
|
|
|
|
global_scope: GlobalScope<Entry>,
|
|
|
|
|
command_scope: CommandScope<Entry>,
|
|
|
|
@ -412,7 +412,7 @@ pub fn read_text_file_lines<R: Runtime>(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
pub fn read_text_file_lines_next<R: Runtime>(
|
|
|
|
|
pub async fn read_text_file_lines_next<R: Runtime>(
|
|
|
|
|
webview: Webview<R>,
|
|
|
|
|
rid: ResourceId,
|
|
|
|
|
) -> CommandResult<(Option<String>, bool)> {
|
|
|
|
@ -547,7 +547,7 @@ pub enum SeekMode {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
pub fn seek<R: Runtime>(
|
|
|
|
|
pub async fn seek<R: Runtime>(
|
|
|
|
|
webview: Webview<R>,
|
|
|
|
|
rid: ResourceId,
|
|
|
|
|
offset: i64,
|
|
|
|
@ -623,7 +623,7 @@ pub fn fstat<R: Runtime>(webview: Webview<R>, rid: ResourceId) -> CommandResult<
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
pub fn truncate<R: Runtime>(
|
|
|
|
|
pub async fn truncate<R: Runtime>(
|
|
|
|
|
webview: Webview<R>,
|
|
|
|
|
global_scope: GlobalScope<Entry>,
|
|
|
|
|
command_scope: CommandScope<Entry>,
|
|
|
|
@ -658,7 +658,7 @@ pub fn truncate<R: Runtime>(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
pub fn ftruncate<R: Runtime>(
|
|
|
|
|
pub async fn ftruncate<R: Runtime>(
|
|
|
|
|
webview: Webview<R>,
|
|
|
|
|
rid: ResourceId,
|
|
|
|
|
len: Option<u64>,
|
|
|
|
@ -670,7 +670,7 @@ pub fn ftruncate<R: Runtime>(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
pub fn write<R: Runtime>(
|
|
|
|
|
pub async fn write<R: Runtime>(
|
|
|
|
|
webview: Webview<R>,
|
|
|
|
|
rid: ResourceId,
|
|
|
|
|
data: Vec<u8>,
|
|
|
|
@ -753,7 +753,7 @@ fn write_file_inner<R: Runtime>(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
pub fn write_file<R: Runtime>(
|
|
|
|
|
pub async fn write_file<R: Runtime>(
|
|
|
|
|
webview: Webview<R>,
|
|
|
|
|
global_scope: GlobalScope<Entry>,
|
|
|
|
|
command_scope: CommandScope<Entry>,
|
|
|
|
@ -781,7 +781,7 @@ pub fn write_file<R: Runtime>(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
pub fn write_text_file<R: Runtime>(
|
|
|
|
|
pub async fn write_text_file<R: Runtime>(
|
|
|
|
|
webview: Webview<R>,
|
|
|
|
|
global_scope: GlobalScope<Entry>,
|
|
|
|
|
command_scope: CommandScope<Entry>,
|
|
|
|
|