Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ts_morph/common/mod.ts>FileUtils.readFileOrNotExists

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
method FileUtils.readFileOrNotExists
import { FileUtils } from "https://deno.land/x/ts_morph@16.0.0/common/mod.ts";

Reads a file or returns false if the file doesn't exist.

Parameters

fileSystem: FileSystemHost
  • File System.
  • Path to file.
encoding: string
  • File encoding.

Returns

Promise<string | false>