Skip to main content
FileHandle.chown - node__fs--promises.d.ts - Node documentation
method FileHandle.chown

Usage in Deno

```typescript import { type FileHandle } from "node:node__fs--promises.d.ts"; ```
FileHandle.chown(
uid: number,
gid: number,
): Promise<void>
Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html).

Parameters

uid: number
The file's new owner's user id.
gid: number
The file's new group's group id.

Return Type

Promise<void>
Fulfills with `undefined` upon success.