MCPcopy Create free account
hub / github.com/Snapchat/Valdi / isDirectory

Function isDirectory

npm_modules/cli/src/utils/fileUtils.ts:137–139  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

135}
136
137export function isDirectory(filePath: string): boolean {
138 return fs.existsSync(filePath) && fs.statSync(filePath).isDirectory();
139}
140
141export function hasExtension(filePath: string, extension: string): boolean {
142 return fs.existsSync(filePath) && path.extname(filePath) === extension;

Callers 8

checkAndFormatFilesFunction · 0.90
makeDirectoryMethod · 0.85
searchForModuleMethod · 0.85
storeMethod · 0.85
loadModuleMethod · 0.85
resolveRunfilesTestPathFunction · 0.85
withOutputPathMethod · 0.85
deleteAllFunction · 0.85

Calls 1

isDirectoryMethod · 0.45

Tested by 1

resolveRunfilesTestPathFunction · 0.68