## Index

### Modules

- access
- appendFile
- chmod
- chown
- close
- constants
- copyFile
- exists
- fchmod
- fchown
- fdatasync
- fstat
- fsync
- ftruncate
- futimes
- lchmod
- lchown
- link
- lstat
- mkdir
- mkdtemp
- open
- promises
- read
- readFile
- readdir
- readlink
- realpath
- realpathSync
- rename
- rmdir
- stat
- symlink
- truncate
- unlink
- utimes
- write
- writeFile

### Classes

- Dirent
- ReadStream
- Stats
- WriteStream

### Interfaces

- FSWatcher
- MakeDirectoryOptions

### Type aliases

- BinaryData
- PathLike
- WriteFileOptions

### Functions

- accessSync
- appendFileSync
- chmodSync
- chownSync
- closeSync
- copyFileSync
- createReadStream
- createWriteStream
- existsSync
- fchmodSync
- fchownSync
- fdatasyncSync
- fstatSync
- fsyncSync
- ftruncateSync
- futimesSync
- lchmodSync
- lchownSync
- linkSync
- lstatSync
- mkdirSync
- mkdtempSync
- openSync
- readFileSync
- readSync
- readdirSync
- readlinkSync
- renameSync
- rmdirSync
- statSync
- symlinkSync
- truncateSync
- unlinkSync
- unwatchFile
- utimesSync
- watch
- watchFile
- writeFileSync
- writeSync

## Type aliases

### BinaryData

BinaryData: Buffer | DataView | TypedArray

- Defined in node_modules/@types/node/fs.d.ts:11

### PathLike

PathLike: string | Buffer | URL

- Defined in node_modules/@types/node/fs.d.ts:9

Valid types for path values in "fs".

### WriteFileOptions

WriteFileOptions: object | string | null

- Defined in node_modules/@types/node/fs.d.ts:1294

## Functions

### accessSync

- accessSync(path: PathLike, mode?: undefined | number): void

- - Defined in node_modules/@types/node/fs.d.ts:1680

  Synchronously tests a user's permissions for the file specified by path.

  #### Parameters

  - ##### path: PathLike

    A path to a file or directory. If a URL is provided, it must use the `file:` protocol. URL support is experimental.

  - ##### Optional mode: undefined | number

  #### Returns void

### appendFileSync

- appendFileSync(file: PathLike | number, data: any, options?: WriteFileOptions): void

- - Defined in node_modules/@types/node/fs.d.ts:1402

  Synchronously append data to a file, creating the file if it does not exist.

  #### Parameters

  - ##### file: PathLike | number

    A path to a file. If a URL is provided, it must use the `file:` protocol. URL support is experimental. If a file descriptor is provided, the underlying file will not be closed automatically.

  - ##### data: any

    The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.

  - ##### Optional options: WriteFileOptions

    Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. If `encoding` is not supplied, the default of `'utf8'` is used. If `mode` is not supplied, the default of `0o666` is used. If `mode` is a string, it is parsed as an octal integer. If `flag` is not supplied, the default of `'a'` is used.

  #### Returns void

### chmodSync

- chmodSync(path: PathLike, mode: string | number): void

- - Defined in node_modules/@types/node/fs.d.ts:318

  Synchronous chmod(2) - Change permissions of a file.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### mode: string | number

    A file mode. If a string is passed, it is parsed as an octal integer.

  #### Returns void

### chownSync

- chownSync(path: PathLike, uid: number, gid: number): void

- - Defined in node_modules/@types/node/fs.d.ts:252

  Synchronous chown(2) - Change ownership of a file.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### uid: number

  - ##### gid: number

  #### Returns void

### closeSync

- closeSync(fd: number): void

- - Defined in node_modules/@types/node/fs.d.ts:929

  Synchronous close(2) - close a file descriptor.

  #### Parameters

  - ##### fd: number

    A file descriptor.

  #### Returns void

### copyFileSync

- copyFileSync(src: PathLike, dest: PathLike, flags?: undefined | number): void

- - Defined in node_modules/@types/node/fs.d.ts:1782

  Synchronously copies src to dest. By default, dest is overwritten if it already exists. Node.js makes no guarantees about the atomicity of the copy operation. If an error occurs after the destination file has been opened for writing, Node.js will attempt to remove the destination.

  #### Parameters

  - ##### src: PathLike

    A path to the source file.

  - ##### dest: PathLike

    A path to the destination file.

  - ##### Optional flags: undefined | number

    An optional integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.

  #### Returns void

### createReadStream

- createReadStream(path: PathLike, options?: string | object): ReadStream

- - Defined in node_modules/@types/node/fs.d.ts:1687

  Returns a new `ReadStream` object.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol. URL support is experimental.

  - ##### Optional options: string | object

  #### Returns ReadStream

### createWriteStream

- createWriteStream(path: PathLike, options?: string | object): WriteStream

- - Defined in node_modules/@types/node/fs.d.ts:1703

  Returns a new `WriteStream` object.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol. URL support is experimental.

  - ##### Optional options: string | object

  #### Returns WriteStream

### existsSync

- existsSync(path: PathLike): boolean

- - Defined in node_modules/@types/node/fs.d.ts:1493

  Synchronously tests whether or not the given path exists by checking with the file system.

  #### Parameters

  - ##### path: PathLike

    A path to a file or directory. If a URL is provided, it must use the `file:` protocol. URL support is experimental.

  #### Returns boolean

### fchmodSync

- fchmodSync(fd: number, mode: string | number): void

- - Defined in node_modules/@types/node/fs.d.ts:342

  Synchronous fchmod(2) - Change permissions of a file.

  #### Parameters

  - ##### fd: number

    A file descriptor.

  - ##### mode: string | number

    A file mode. If a string is passed, it is parsed as an octal integer.

  #### Returns void

### fchownSync

- fchownSync(fd: number, uid: number, gid: number): void

- - Defined in node_modules/@types/node/fs.d.ts:273

  Synchronous fchown(2) - Change ownership of a file.

  #### Parameters

  - ##### fd: number

    A file descriptor.

  - ##### uid: number

  - ##### gid: number

  #### Returns void

### fdatasyncSync

- fdatasyncSync(fd: number): void

- - Defined in node_modules/@types/node/fs.d.ts:1731

  Synchronous fdatasync(2) - synchronize a file's in-core state with storage device.

  #### Parameters

  - ##### fd: number

    A file descriptor.

  #### Returns void

### fstatSync

- fstatSync(fd: number): Stats

- - Defined in node_modules/@types/node/fs.d.ts:408

  Synchronous fstat(2) - Get file status.

  #### Parameters

  - ##### fd: number

    A file descriptor.

  #### Returns Stats

### fsyncSync

- fsyncSync(fd: number): void

- - Defined in node_modules/@types/node/fs.d.ts:1034

  Synchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.

  #### Parameters

  - ##### fd: number

    A file descriptor.

  #### Returns void

### ftruncateSync

- ftruncateSync(fd: number, len?: number | null): void

- - Defined in node_modules/@types/node/fs.d.ts:231

  Synchronous ftruncate(2) - Truncate a file to a specified length.

  #### Parameters

  - ##### fd: number

    A file descriptor.

  - ##### Optional len: number | null

    If not specified, defaults to `0`.

  #### Returns void

### futimesSync

- futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void

- - Defined in node_modules/@types/node/fs.d.ts:1013

  Synchronously change file timestamps of the file referenced by the supplied file descriptor.

  #### Parameters

  - ##### fd: number

    A file descriptor.

  - ##### atime: string | number | Date

    The last access time. If a string is provided, it will be coerced to number.

  - ##### mtime: string | number | Date

    The last modified time. If a string is provided, it will be coerced to number.

  #### Returns void

### lchmodSync

- lchmodSync(path: PathLike, mode: string | number): void

- - Defined in node_modules/@types/node/fs.d.ts:366

  Synchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### mode: string | number

    A file mode. If a string is passed, it is parsed as an octal integer.

  #### Returns void

### lchownSync

- lchownSync(path: PathLike, uid: number, gid: number): void

- - Defined in node_modules/@types/node/fs.d.ts:294

  Synchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### uid: number

  - ##### gid: number

  #### Returns void

### linkSync

- linkSync(existingPath: PathLike, newPath: PathLike): void

- - Defined in node_modules/@types/node/fs.d.ts:453

  Synchronous link(2) - Create a new link (also known as a hard link) to an existing file.

  #### Parameters

  - ##### existingPath: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### newPath: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  #### Returns void

### lstatSync

- lstatSync(path: PathLike): Stats

- - Defined in node_modules/@types/node/fs.d.ts:429

  Synchronous lstat(2) - Get file status. Does not dereference symbolic links.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  #### Returns Stats

### mkdirSync

- mkdirSync(path: PathLike, options?: number | string | MakeDirectoryOptions | null): void

- - Defined in node_modules/@types/node/fs.d.ts:735

  Synchronous mkdir(2) - create a directory.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### Optional options: number | string | MakeDirectoryOptions | null

    Either the file mode, or an object optionally specifying the file mode and whether parent folders should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.

  #### Returns void

### mkdtempSync

- mkdtempSync(prefix: string, options?: object | BufferEncoding | null): string
- mkdtempSync(prefix: string, options: object | "buffer"): Buffer
- mkdtempSync(prefix: string, options?: object | string | null): string | Buffer

- - Defined in node_modules/@types/node/fs.d.ts:793

  Synchronously creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.

  #### Parameters

  - ##### prefix: string

  - ##### Optional options: object | BufferEncoding | null

    The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.

  #### Returns string

- - Defined in node_modules/@types/node/fs.d.ts:800

  Synchronously creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.

  #### Parameters

  - ##### prefix: string

  - ##### options: object | "buffer"

    The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.

  #### Returns Buffer

- - Defined in node_modules/@types/node/fs.d.ts:807

  Synchronously creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.

  #### Parameters

  - ##### prefix: string

  - ##### Optional options: object | string | null

    The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.

  #### Returns string | Buffer

### openSync

- openSync(path: PathLike, flags: string | number, mode?: string | number | null): number

- - Defined in node_modules/@types/node/fs.d.ts:959

  Synchronous open(2) - open and possibly create a file, returning a file descriptor..

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### flags: string | number

  - ##### Optional mode: string | number | null

    A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.

  #### Returns number

### readFileSync

- readFileSync(path: PathLike | number, options?: object | null): Buffer
- readFileSync(path: PathLike | number, options: object | string): string
- readFileSync(path: PathLike | number, options?: object | string | null): string | Buffer

- - Defined in node_modules/@types/node/fs.d.ts:1272

  Synchronously reads the entire contents of a file.

  #### Parameters

  - ##### path: PathLike | number

    A path to a file. If a URL is provided, it must use the `file:` protocol. URL support is experimental. If a file descriptor is provided, the underlying file will not be closed automatically.

  - ##### Optional options: object | null

    An object that may contain an optional flag. If a flag is not provided, it defaults to `'r'`.

  #### Returns Buffer

- - Defined in node_modules/@types/node/fs.d.ts:1282

  Synchronously reads the entire contents of a file.

  #### Parameters

  - ##### path: PathLike | number

    A path to a file. If a URL is provided, it must use the `file:` protocol. URL support is experimental. If a file descriptor is provided, the underlying file will not be closed automatically.

  - ##### options: object | string

    Either the encoding for the result, or an object that contains the encoding and an optional flag. If a flag is not provided, it defaults to `'r'`.

  #### Returns string

- - Defined in node_modules/@types/node/fs.d.ts:1292

  Synchronously reads the entire contents of a file.

  #### Parameters

  - ##### path: PathLike | number

    A path to a file. If a URL is provided, it must use the `file:` protocol. URL support is experimental. If a file descriptor is provided, the underlying file will not be closed automatically.

  - ##### Optional options: object | string | null

    Either the encoding for the result, or an object that contains the encoding and an optional flag. If a flag is not provided, it defaults to `'r'`.

  #### Returns string | Buffer

### readSync

- readSync(fd: number, buffer: BinaryData, offset: number, length: number, position: number | null): number

- - Defined in node_modules/@types/node/fs.d.ts:1191

  Synchronously reads data from the file referenced by the supplied file descriptor, returning the number of bytes read.

  #### Parameters

  - ##### fd: number

    A file descriptor.

  - ##### buffer: BinaryData

    The buffer that the data will be written to.

  - ##### offset: number

    The offset in the buffer at which to start writing.

  - ##### length: number

    The number of bytes to read.

  - ##### position: number | null

    The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.

  #### Returns number

### readdirSync

- readdirSync(path: PathLike, options?: object | BufferEncoding | null): string[]
- readdirSync(path: PathLike, options: object | "buffer"): Buffer[]
- readdirSync(path: PathLike, options?: object | string | null): string[] | Buffer[]
- readdirSync(path: PathLike, options: object): Dirent[]

- - Defined in node_modules/@types/node/fs.d.ts:887

  Synchronous readdir(3) - read a directory.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### Optional options: object | BufferEncoding | null

    The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.

  #### Returns string[]

- - Defined in node_modules/@types/node/fs.d.ts:894

  Synchronous readdir(3) - read a directory.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### options: object | "buffer"

    The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.

  #### Returns Buffer[]

- - Defined in node_modules/@types/node/fs.d.ts:901

  Synchronous readdir(3) - read a directory.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### Optional options: object | string | null

    The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.

  #### Returns string[] | Buffer[]

- - Defined in node_modules/@types/node/fs.d.ts:908

  Asynchronous readdir(3) - read a directory.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### options: object

    If called with `withFileTypes: true` the result data will be an array of Dirent.

    - ##### withFileTypes: true

  #### Returns Dirent[]

### readlinkSync

- readlinkSync(path: PathLike, options?: object | BufferEncoding | null): string
- readlinkSync(path: PathLike, options: object | "buffer"): Buffer
- readlinkSync(path: PathLike, options?: object | string | null): string | Buffer

- - Defined in node_modules/@types/node/fs.d.ts:550

  Synchronous readlink(2) - read value of a symbolic link.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### Optional options: object | BufferEncoding | null

    The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.

  #### Returns string

- - Defined in node_modules/@types/node/fs.d.ts:557

  Synchronous readlink(2) - read value of a symbolic link.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### options: object | "buffer"

    The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.

  #### Returns Buffer

- - Defined in node_modules/@types/node/fs.d.ts:564

  Synchronous readlink(2) - read value of a symbolic link.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### Optional options: object | string | null

    The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.

  #### Returns string | Buffer

### renameSync

- renameSync(oldPath: PathLike, newPath: PathLike): void

- - Defined in node_modules/@types/node/fs.d.ts:170

  Synchronous rename(2) - Change the name or location of a file or directory.

  #### Parameters

  - ##### oldPath: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol. URL support is experimental.

  - ##### newPath: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol. URL support is experimental.

  #### Returns void

### rmdirSync

- rmdirSync(path: PathLike): void

- - Defined in node_modules/@types/node/fs.d.ts:689

  Synchronous rmdir(2) - delete a directory.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  #### Returns void

### statSync

- statSync(path: PathLike): Stats

- - Defined in node_modules/@types/node/fs.d.ts:387

  Synchronous stat(2) - Get file status.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  #### Returns Stats

### symlinkSync

- symlinkSync(target: PathLike, path: PathLike, type?: Type | null): void

- - Defined in node_modules/@types/node/fs.d.ts:492

  Synchronous symlink(2) - Create a new symbolic link to an existing file.

  #### Parameters

  - ##### target: PathLike

    A path to an existing file. If a URL is provided, it must use the `file:` protocol.

  - ##### path: PathLike

    A path to the new symlink. If a URL is provided, it must use the `file:` protocol.

  - ##### Optional type: Type | null

    May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.

  #### Returns void

### truncateSync

- truncateSync(path: PathLike, len?: number | null): void

- - Defined in node_modules/@types/node/fs.d.ts:201

  Synchronous truncate(2) - Truncate a file to a specified length.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### Optional len: number | null

    If not specified, defaults to `0`.

  #### Returns void

### unlinkSync

- unlinkSync(path: PathLike): void

- - Defined in node_modules/@types/node/fs.d.ts:668

  Synchronous unlink(2) - delete a name and possibly the file it refers to.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  #### Returns void

### unwatchFile

- unwatchFile(filename: PathLike, listener?: undefined | function): void

- - Defined in node_modules/@types/node/fs.d.ts:1421

  Stop watching for changes on `filename`.

  #### Parameters

  - ##### filename: PathLike

    A path to a file or directory. If a URL is provided, it must use the `file:` protocol. URL support is experimental.

  - ##### Optional listener: undefined | function

  #### Returns void

### utimesSync

- utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void

- - Defined in node_modules/@types/node/fs.d.ts:986

  Synchronously change file timestamps of the file referenced by the supplied path.

  #### Parameters

  - ##### path: PathLike

    A path to a file. If a URL is provided, it must use the `file:` protocol.

  - ##### atime: string | number | Date

    The last access time. If a string is provided, it will be coerced to number.

  - ##### mtime: string | number | Date

    The last modified time. If a string is provided, it will be coerced to number.

  #### Returns void

### watch

- watch(filename: PathLike, options: object | BufferEncoding | undefined | null, listener?: undefined | function): FSWatcher
- watch(filename: PathLike, options: object | "buffer", listener?: undefined | function): FSWatcher
- watch(filename: PathLike, options: object | string | null, listener?: undefined | function): FSWatcher
- watch(filename: PathLike, listener?: undefined | function): FSWatcher

- - Defined in node_modules/@types/node/fs.d.ts:1432

  Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.

  #### Parameters

  - ##### filename: PathLike

    A path to a file or directory. If a URL is provided, it must use the `file:` protocol. URL support is experimental.

  - ##### options: object | BufferEncoding | undefined | null

    Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. If `encoding` is not supplied, the default of `'utf8'` is used. If `persistent` is not supplied, the default of `true` is used. If `recursive` is not supplied, the default of `false` is used.

  - ##### Optional listener: undefined | function

  #### Returns FSWatcher

- - Defined in node_modules/@types/node/fs.d.ts:1447

  Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.

  #### Parameters

  - ##### filename: PathLike

    A path to a file or directory. If a URL is provided, it must use the `file:` protocol. URL support is experimental.

  - ##### options: object | "buffer"

    Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. If `encoding` is not supplied, the default of `'utf8'` is used. If `persistent` is not supplied, the default of `true` is used. If `recursive` is not supplied, the default of `false` is used.

  - ##### Optional listener: undefined | function

  #### Returns FSWatcher

- - Defined in node_modules/@types/node/fs.d.ts:1458

  Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.

  #### Parameters

  - ##### filename: PathLike

    A path to a file or directory. If a URL is provided, it must use the `file:` protocol. URL support is experimental.

  - ##### options: object | string | null

    Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. If `encoding` is not supplied, the default of `'utf8'` is used. If `persistent` is not supplied, the default of `true` is used. If `recursive` is not supplied, the default of `false` is used.

  - ##### Optional listener: undefined | function

  #### Returns FSWatcher

- - Defined in node_modules/@types/node/fs.d.ts:1469

  Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.

  #### Parameters

  - ##### filename: PathLike

    A path to a file or directory. If a URL is provided, it must use the `file:` protocol. URL support is experimental.

  - ##### Optional listener: undefined | function

  #### Returns FSWatcher

### watchFile

- watchFile(filename: PathLike, options: object | undefined, listener: function): void
- watchFile(filename: PathLike, listener: function): void

- - Defined in node_modules/@types/node/fs.d.ts:1407

  Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.

  #### Parameters

  - ##### filename: PathLike

  - ##### options: object | undefined

  - ##### listener: function

    - - (curr: Stats, prev: Stats): void

      - #### Parameters

        - ##### curr: Stats

        - ##### prev: Stats

        #### Returns void

- - Defined in node_modules/@types/node/fs.d.ts:1414

  Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.

  #### Parameters

  - ##### filename: PathLike

    A path to a file or directory. If a URL is provided, it must use the `file:` protocol. URL support is experimental.

  - ##### listener: function

    - - (curr: Stats, prev: Stats): void

      - #### Parameters

        - ##### curr: Stats

        - ##### prev: Stats

        #### Returns void

### writeFileSync

- writeFileSync(path: PathLike | number, data: any, options?: WriteFileOptions): void

- - Defined in node_modules/@types/node/fs.d.ts:1348

  Synchronously writes data to a file, replacing the file if it already exists.

  #### Parameters

  - ##### path: PathLike | number

    A path to a file. If a URL is provided, it must use the `file:` protocol. URL support is experimental. If a file descriptor is provided, the underlying file will not be closed automatically.

  - ##### data: any

    The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.

  - ##### Optional options: WriteFileOptions

    Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. If `encoding` is not supplied, the default of `'utf8'` is used. If `mode` is not supplied, the default of `0o666` is used. If `mode` is a string, it is parsed as an octal integer. If `flag` is not supplied, the default of `'w'` is used.

  #### Returns void

### writeSync

- writeSync(fd: number, buffer: BinaryData, offset?: number | null, length?: number | null, position?: number | null): number
- writeSync(fd: number, string: any, position?: number | null, encoding?: string | null): number

- - Defined in node_modules/@types/node/fs.d.ts:1143

  Synchronously writes `buffer` to the file referenced by the supplied file descriptor, returning the number of bytes written.

  #### Parameters

  - ##### fd: number

    A file descriptor.

  - ##### buffer: BinaryData

  - ##### Optional offset: number | null

    The part of the buffer to be written. If not supplied, defaults to `0`.

  - ##### Optional length: number | null

    The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.

  - ##### Optional position: number | null

    The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.

  #### Returns number

- - Defined in node_modules/@types/node/fs.d.ts:1152

  Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written.

  #### Parameters

  - ##### fd: number

    A file descriptor.

  - ##### string: any

    A string to write. If something other than a string is supplied it will be coerced to a string.

  - ##### Optional position: number | null

    The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.

  - ##### Optional encoding: string | null

    The expected string encoding.

  #### Returns number

Generated using TypeDoc