Module

x/ts_morph/ts_morph.js>Directory

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class Directory
import { Directory } from "https://dotland.deno.dev/x/ts_morph@21.0.0/ts_morph.js";

Constructors

new
Directory(context, path)

Properties

readonly
_context

Methods

addDirectoryAtPath(relativeOrAbsoluteDirPath, options?)
addDirectoryAtPathIfExists(relativeOrAbsoluteDirPath, options?)
addSourceFileAtPath(relativeFilePath)
addSourceFileAtPathIfExists(relativeFilePath)
copy(relativeOrAbsolutePath, options)
copyImmediately(relativeOrAbsolutePath, options)
copyImmediatelySync(relativeOrAbsolutePath, options)
copyToDirectory(dirPathOrDirectory, options)
createDirectory(relativeOrAbsoluteDirPath)
createSourceFile(
relativeFilePath,
sourceFileText,
options,
)
emit(options?)
emitSync(options?)
getDirectory(pathOrCondition)
getDirectoryOrThrow(pathOrCondition)
getRelativePathAsModuleSpecifierTo(sourceFileDirOrFilePath)
getRelativePathTo(sourceFileDirOrPath)
getSourceFile(pathOrCondition)
getSourceFileOrThrow(pathOrCondition)
getSourceFiles(globPatterns)
isAncestorOf(possibleDescendant)
isDescendantOf(possibleAncestor)
move(relativeOrAbsolutePath, options)
moveImmediately(relativeOrAbsolutePath, options)
moveImmediatelySync(relativeOrAbsolutePath, options)
moveToDirectory(dirPathOrDirectory, options)