Skip to content
Class

FilePathSource

A source backed by a path to a file. Intended for server-side usage in Node, Bun, or Deno.

Make sure to call .dispose() on the corresponding Input when done to explicitly free the internal file handle acquired by this source.

Extends: PathedSource

Constructor

ts
constructor(
	filePath: string,
	options: FilePathSourceOptions = {},
): FilePathSource;

Creates a new FilePathSource backed by the file at the specified file path.

See FilePathSourceOptions.

Released under the Mozilla Public License 2.0.