Skip to main content
Module

x/ts_morph/mod.ts>Directory#getRelativePathTo

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
method Directory.prototype.getRelativePathTo
import { Directory } from "https://deno.land/x/ts_morph@15.1.0/mod.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