Module

x/ts_morph/common/ts_morph_common.js>FileUtils

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

Constructors

new
FileUtils()

Static Properties

ENOENT: string

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,
)
standardizeSlashes(fileOrDirPath)
toAbsoluteGlob(glob, cwd)