Deno.chmodsync
chmodSync
-
chmodSync(path: string, mode: number): void
-
同步地更改指定路径下特定的文件 / 目录的权限。忽略进程的 umask。
Synchronously changes the permission of a specific file/directory of specified path. Ignores the process’s umask.
Deno.chmodSync("/path/to/file", 0o666);
相关完整说明,参考 chmod
For a full description, see chmod
注意:该 API 当前在 Windows 上使用会抛出异常。
NOTE: This API currently throws on Windows
需要
allow-write
权限。Requires
allow-write
permission.
参数
- ##### path: string
- ##### mode: number