Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
42b91801
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
42b91801
编写于
3月 23, 2022
作者:
W
wusongqing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updated docs
Signed-off-by:
N
wusongqing
<
wusongqing@huawei.com
>
上级
3d43f67e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
53 addition
and
4 deletion
+53
-4
en/application-dev/reference/apis/js-apis-process.md
en/application-dev/reference/apis/js-apis-process.md
+52
-3
en/application-dev/reference/apis/js-apis-xml.md
en/application-dev/reference/apis/js-apis-xml.md
+1
-1
未找到文件。
en/application-dev/reference/apis/js-apis-process.md
浏览文件 @
42b91801
...
...
@@ -10,12 +10,11 @@
import process from '@ohos.process';
```
## System Capabilities
SystemCapability.Utils.Lang
## Attributes
**System capability**
: SystemCapability.Utils.Lang
| Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- |
| egid | number | Yes| No| Effective group identifier (EGID) of a process.|
...
...
@@ -35,6 +34,8 @@ Allows a process to obtain the standard input and output of its child processes,
### Attributes
**System capability**
: SystemCapability.Utils.Lang
| Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- |
| pid | number | Yes| No| PID of the child process.|
...
...
@@ -49,6 +50,8 @@ wait(): Promise<number>
Waits until the child process ends. This method uses a promise to return the exit code of the child process.
**System capability**
: SystemCapability.Utils.Lang
**Return value**
| Type| Description|
...
...
@@ -72,6 +75,8 @@ getOutput(): Promise<Uint8Array>
Obtains the standard output of the child process.
**System capability**
: SystemCapability.Utils.Lang
**Return value**
| Type| Description|
...
...
@@ -95,6 +100,8 @@ getErrorOutput(): Promise<Uint8Array>
Obtains the standard error output of the child process.
**System capability**
: SystemCapability.Utils.Lang
**Return value**
| Type| Description|
...
...
@@ -118,6 +125,8 @@ close(): void
Closes the child process in running.
**System capability**
: SystemCapability.Utils.Lang
**Example**
```
...
...
@@ -132,6 +141,8 @@ kill(signal: number | string): void
Sends a signal to the specified child process to terminate it.
**System capability**
: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
...
...
@@ -152,6 +163,8 @@ isIsolatedProcess(): boolean
Checks whether this process is isolated.
**System capability**
: SystemCapability.Utils.Lang
**Return value**
| Type| Description|
...
...
@@ -171,6 +184,8 @@ isAppUid(v: number): boolean
Checks whether a UID belongs to this app.
**System capability**
: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
...
...
@@ -196,6 +211,8 @@ is64Bit(): boolean
Checks whether this process is running in a 64-bit environment.
**System capability**
: SystemCapability.Utils.Lang
**Return value**
| Type| Description|
...
...
@@ -215,6 +232,8 @@ getUidForName(v: string): number
Obtains the process UID based on the process name.
**System capability**
: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
...
...
@@ -240,6 +259,8 @@ getThreadPriority(v: number): number
Obtains the thread priority based on the specified TID.
**System capability**
: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
...
...
@@ -266,6 +287,8 @@ getStartRealtime(): number
Obtains the duration, in milliseconds, from the time the system starts to the time the process starts.
**System capability**
: SystemCapability.Utils.Lang
**Return value**
| Type| Description|
...
...
@@ -284,6 +307,8 @@ getPastCpuTime(): number
Obtains the CPU time (in milliseconds) from the time the process starts to the current time.
**System capability**
: SystemCapability.Utils.Lang
**Return value**
| Type| Description|
...
...
@@ -303,6 +328,8 @@ getSystemConfig(name: number): number
Obtains the system configuration.
**System capability**
: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
...
...
@@ -329,6 +356,8 @@ getEnvironmentVar(name: string): string
Obtains the value of an environment variable.
**System capability**
: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
...
...
@@ -354,6 +383,8 @@ runCmd(command: string, options?: { timeout : number, killSignal : number | stri
Forks a new process to run a shell command and returns the
**ChildProcess**
object.
**System capability**
: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
...
...
@@ -392,6 +423,8 @@ abort(): void
Aborts a process and generates a core file. This method will cause a process to exit immediately. Exercise caution when using this method.
**System capability**
: SystemCapability.Utils.Lang
**Example**
```
...
...
@@ -405,6 +438,8 @@ on(type: string, listener: EventListener): void
Stores the events triggered by the user.
**System capability**
: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
...
...
@@ -433,6 +468,8 @@ off(type: string): boolean
Deletes the event stored by the user.
**System capability**
: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
...
...
@@ -461,6 +498,10 @@ exit(code: number): void
Terminates this process.
Exercise caution when using this API.
**System capability**
: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
...
...
@@ -480,6 +521,8 @@ cwd(): string
Obtains the working directory of this process.
**System capability**
: SystemCapability.Utils.Lang
**Example**
```
...
...
@@ -493,6 +536,8 @@ chdir(dir: string): void
Changes the working directory of this process.
**System capability**
: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
...
...
@@ -512,6 +557,8 @@ uptime(): number
Obtains the running time of this process.
**System capability**
: SystemCapability.Utils.Lang
**Return value**
| Type| Description|
...
...
@@ -531,6 +578,8 @@ kill(signal: number, pid: number): boolean
Sends a signal to the specified process to terminate it.
**System capability**
: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
...
...
en/application-dev/reference/apis/js-apis-xml.md
浏览文件 @
42b91801
...
...
@@ -340,7 +340,7 @@ Defines the XML parsing options.
## ParseInfo
Provides
method
s to manage the parsed XML information.
Provides
API
s to manage the parsed XML information.
### getColumnNumber
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录