文件模式常量
【File mode constants】
以下常量用于与 <fs.Stats> 对象的 mode 属性一起使用,以确定文件的访问权限。
【The following constants are meant for use with the <fs.Stats> object's
mode property for determining the access permissions for a file.】
| Constant | Description |
|---|---|
S_IRWXU |
File mode indicating readable, writable, and executable by owner. |
S_IRUSR |
File mode indicating readable by owner. |
S_IWUSR |
File mode indicating writable by owner. |
S_IXUSR |
File mode indicating executable by owner. |
S_IRWXG |
File mode indicating readable, writable, and executable by group. |
S_IRGRP |
File mode indicating readable by group. |
S_IWGRP |
File mode indicating writable by group. |
S_IXGRP |
File mode indicating executable by group. |
S_IRWXO |
File mode indicating readable, writable, and executable by others. |
S_IROTH |
File mode indicating readable by others. |
S_IWOTH |
File mode indicating writable by others. |
S_IXOTH |
File mode indicating executable by others. |
在 Windows 上,只有 S_IRUSR 和 S_IWUSR 可用。
【On Windows, only S_IRUSR and S_IWUSR are available.】