Skip to main content
Module

x/deno2node/src/deps.deno.ts>SourceFile#getRelativePathTo

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

Gets the relative path to the specified path.

Parameters

fileOrDirPath: string
  • The file or directory path.

Returns

string

Gets the relative path to another source file.

Parameters

sourceFile: SourceFile
  • Source file.

Returns

string

Gets the relative path to another directory.

Parameters

directory: Directory
  • Directory.

Returns

string