Skip to main content
Module

x/ts_morph/mod.ts>SourceFile#copyToDirectory

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

Copies this source file to the specified directory.

This will modify the module specifiers in the new file, if necessary.

Parameters

dirPathOrDirectory: string | Directory

Directory path or directory object to copy the file to.

optional
options: SourceFileCopyOptions

Options for copying.

Returns

The source file the copy was made to.