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

Usage in Deno

```typescript import { type FileHandle } from "node:node__fs--promises.d.ts"; ```
FileHandle.appendFile(
data: string | Uint8Array,
options?:
(
ObjectEncodingOptions
& FlagAndOpenMode
& { flush?: boolean | undefined; }
)

| BufferEncoding
| null
,
): Promise<void>
Alias of `filehandle.writeFile()`. When operating on file handles, the mode cannot be changed from what it was set to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`.

Parameters

data: string | Uint8Array
optional
options:
(
ObjectEncodingOptions
& FlagAndOpenMode
& { flush?: boolean | undefined; }
)

| BufferEncoding
| null

Return Type

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