1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
use js_sys::{JsString, Promise};
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct CopyOptions {
pub recursive: Option<bool>,
pub force: Option<bool>,
}
#[wasm_bindgen]
#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct MoveOptions {
pub force: Option<bool>,
}
#[wasm_bindgen(module = "@actions/io")]
extern {
#[wasm_bindgen]
#[must_use]
pub fn cp(source: &JsString, target: &JsString, options: Option<CopyOptions>) -> Promise;
#[wasm_bindgen]
#[must_use]
pub fn mv(source: &JsString, target: &JsString, options: Option<MoveOptions>) -> Promise;
#[wasm_bindgen(js_name = "rmRF")]
#[must_use]
pub fn rm_rf(path: &JsString) -> Promise;
#[wasm_bindgen(js_name = "mkdirP")]
#[must_use]
pub fn mkdir_p(path: &JsString) -> Promise;
#[wasm_bindgen]
#[must_use]
pub fn which(tool: &JsString, check: Option<bool>) -> Promise;
}