W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
constructor
?new Child(: ):
Child
pid
number
參數(shù)
名字 | 類(lèi)型 |
---|---|
pid | number |
Defined in: shell.ts:325
pid
??PID:?number
?
子進(jìn)程 。pid
Defined in: shell.ts:323
kill
?kill():
Promise
<void
>
終止子進(jìn)程。
Returns: Promise
<void
>
指示操作成功或失敗的承諾。
write
?write(: |
Uint8Array
):Promise
data
string
<void
>
寫(xiě)入 .?data
??stdin
?
例
import { Command } from '@tauri-apps/api/shell';
const command = new Command('node');
const child = await command.spawn();
await child.write('message');
await child.write([0, 1, 2, 3, 4, 5]);
參數(shù)
名字 | 類(lèi)型 | 描述 |
---|---|---|
data | string | Uint8數(shù)組 | 要寫(xiě)入的消息,可以是字符串,也可以是字節(jié)數(shù)組。 |
Returns:
Promise
<void
>
指示操作成功或失敗的承諾。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: