Skip to main content
close - node__fs.d.ts - Node documentation
function close

Usage in Deno

```typescript import { close } from "node:node__fs.d.ts"; ```
close(
fd: number,
callback?: NoParamCallback,
): void
Closes the file descriptor. No arguments other than a possible exception are given to the completion callback. Calling `fs.close()` on any file descriptor (`fd`) that is currently in use through any other `fs` operation may lead to undefined behavior. See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.

Parameters

fd: number
optional
callback: NoParamCallback

Return Type

void