Skip to main content
Module

x/deno2node/src/deps.deno.ts>Directory#addDirectoryAtPathIfExists

Compile your Deno project to run on Node.js.
Go to Latest
method Directory.prototype.addDirectoryAtPathIfExists
import { Directory } from "https://deno.land/x/deno2node@v1.6.0/src/deps.deno.ts";

Adds an existing directory from the relative path or directory name, or returns undefined if it doesn't exist.

Will return the directory if it was already added.

Parameters

relativeOrAbsoluteDirPath: string
  • Directory name or path to the directory that should be added.
optional
options: DirectoryAddOptions
  • Options.

Returns

Directory | undefined