Skip to main content
Module

x/ts_morph/common/ts_morph_common.js>FileUtils

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class FileUtils
import { FileUtils } from "https://deno.land/x/ts_morph@17.0.1/common/ts_morph_common.js";

Constructors

new
FileUtils()

Static Methods

getBaseName(fileOrDirPath)
getDescendantDirectories(fileSystemWrapper, dirPath)
getDirPath(fileOrDirPath)
getExtension(fileOrDirPath)
getRelativePathTo(absoluteDirPathFrom, absolutePathTo)
getStandardizedAbsolutePath(
fileSystem,
fileOrDirPath,
relativeBase,
)
isRootDirPath(dirOrFilePath)
pathEndsWith(fileOrDirPath, endsWithPath)
pathIsAbsolute(fileOrDirPath)
pathJoin(basePath, ...paths)
pathStartsWith(fileOrDirPath, startsWithPath)
readFileOrNotExists(
fileSystem,
filePath,
encoding,
)
readFileOrNotExistsSync(
fileSystem,
filePath,
encoding,
)
splitPathBySlashes(fileOrDirPath)
standardizeSlashes(fileOrDirPath)
toAbsoluteGlob(glob, cwd)