Deno.chown (path: string | URL, uid: number | null, gid: number | null): Promise<void>
更改常规文件或目录的所有者。
此功能在Windows上不可用。
原文: Change owner of a regular file or directory.
This functionality is not available on Windows.
路径 : 字符串 | URL
uid : 数字 | null
gid : 数字 | null
原文:
path : string | URL
uid : number | null
gid : number | null
Promise<void>
原文: Promise<void>
await Deno.chown("myFile.txt", 1000, 1002);
需要 allow-write 权限。
如果在Windows上执行则抛出错误(未实现)
参数:path => 文件的路径
参数:uid => 新所有者的用户ID(UID);如果没有更改,则为null
参数:gid => 新所有者的组ID(GID);如果没有更改,则为null
Requires allow-write permission.
Throws Error (not implemented) if executed on Windows
param:path => path to the file
param:uid => uid user id (UID) of the new owner, or null for no change
param:gid => gid group id (GID) of the new owner, or null for no change