Deno.chownsync
chownSync
-
chownSync(path: string, uid: number, gid: number): void
-
同步地更改常规文件或目录的所有者。该功能在 Windows 上不可用。
Synchronously change owner of a regular file or directory. This functionality is not available on Windows.
Deno.chownSync("myFile.txt", 1000, 1002);
需要
allow-write
权限。Requires
allow-write
permission.如果在 Windows 上执行,将抛出错误(未实现)。
Throws Error (not implemented) if executed on Windows
参数
-
path: string
文件路径
path to the file
-
uid: number
user id (UID) of the new owner
文件新的所有者的用户 ID (UID)
-
gid: number
文件新的所有者的用户组 ID (GID)
group id (GID) of the new owner
返回 void
-