Skip to main content
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://deno.land/x/ts_morph@15.1.0/ts_morph.js";

Constructors

new
Directory(context, path)

Properties

readonly
_context

Methods

_copyInternal(newPath, options)
_emitInternal(options?)
_moveInternal(
newPath,
options,
preAction,
)
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)

Static Methods

_isAncestorOfDir(ancestor, descendant)