提交 2bac59c5 编写于 作者: A annie_wangli

update docs

Signed-off-by: Nannie_wangli <annie.wangli@huawei.com>
上级 c7ec364f
......@@ -553,7 +553,7 @@ Synchronously opens a file.
| -------- | -------- | -------- | -------- |
| path | string | Yes| Absolute path of the target file.|
| flags | number | No| Option for opening a file. You must specify one of the following options. By default, the file is opened in read-only mode. <br/>-&nbsp;**0o0**: Open the file in read-only mode. <br/>-&nbsp;**0o1**: Open the file in write-only mode. <br/>-&nbsp;**0o2**: Open the file in read/write mode. <br/>You can also specify the following options, separated using a bitwise OR operator (&#124;). By default, no extra option is specified. <br/>-&nbsp;**0o100**: If the file does not exist, create it. If you use this option, you must also specify **mode**. <br/>-&nbsp;**0o200**: If **0o100** is added and the file already exists, throw an exception. <br/>-&nbsp;**0o1000**: If the file exists and is open in write-only or read/write mode, truncate the file length to 0. <br/>-&nbsp;**0o2000**: Open the file in append mode. New data will be appended to the file (added to the end of the file). <br/>-&nbsp;**0o4000**: If **path** points to a named pipe (also known as a FIFO), block special file, or character special file, perform non-blocking operations on the open file and in subsequent I/Os. <br/>-&nbsp;**0o200000**: If **path** points to a directory, throw an exception. <br/>-&nbsp;**0o400000**: If **path** points to a symbolic link, throw an exception. <br/>-&nbsp;**0o4010000**: Open the file in synchronous I/O mode.|
| mode | number | No| Permissions on the file. You can specify multiple permissions, separated using a bitwise OR operator (&#124;). The default value is **0o666**. <br/>-&nbsp;**0o666**: The owner, user group, and other users have the read and write permissions on the file. <br/>-&nbsp;**0o700**: The owner has the read, write, and execute permissions. <br/>-&nbsp;**0o400**: The owner has the read permission. <br/>-&nbsp;**0o200**: The owner has the write permission. <br/>-&nbsp;**0o100**: The owner has the execute permission. <br/>-&nbsp;**0o070**: The user group has the read, write, and execute permissions. <br/>-&nbsp;**0o040**: The user group has the read permission. <br/>-&nbsp;**0o020**: The user group has the write permission. <br/>-&nbsp;**0o010**: The user group has the execute permission. <br/>-&nbsp;**0o007**: Other users have the read, write, and execute permissions. <br/>-&nbsp;**0o004**: Other users have the read permission. <br/>-&nbsp;**0o002**: Other users have the write permission. <br/>-&nbsp;**0o001**: Other users have the execute permission.|
| mode | number | No| Permissions on the file. You can specify multiple permissions, separated using a bitwise OR operator (&#124;). The default value is **0o666**. <br/>-&nbsp;**0o666**: The owner, user group, and other users have the read and write permissions on the file. <br/>-&nbsp;**0o700**: The owner has the read, write, and execute permissions. <br/>-&nbsp;**0o400**: The owner has the read permission. <br/>-&nbsp;**0o200**: The owner has the write permission. <br/>-&nbsp;**0o100**: The owner has the execute permission. <br/>-&nbsp;**0o070**: The user group has the read, write, and execute permissions. <br/>-&nbsp;**0o040**: The user group has the read permission. <br/>-&nbsp;**0o020**: The user group has the write permission. <br/>-&nbsp;**0o010**: The user group has the execute permission. <br/>-&nbsp;**0o007**: Other users have the read, write, and execute permissions. <br/>-&nbsp;**0o004**: Other users have the read permission. <br/>-&nbsp;**0o002**: Other users have the write permission. <br/>-&nbsp;**0o001**: Other users have the execute permission.<br/>The file permissions of newly created files are affected by **umask**, which is set as the process starts. Currently, the modification of **umask** is not open.
- Return value
| Type| Description|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册