MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / existsAndIsDirectoryAsync

Function existsAndIsDirectoryAsync

src/shared/utils/fs.ts:190–197  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

188}
189
190export async function existsAndIsDirectoryAsync(file: string): Promise<boolean> {
191 try {
192 const stat = await fs.promises.stat(file);
193 return stat?.isDirectory() ?? false;
194 } catch {
195 return false;
196 }
197}
198
199export function hasPackageMapFile(folder: string): boolean {
200 return existsAndIsFileSync(path.join(folder, ".dart_tool", "package_config.json"));

Callers 2

fs.test.tsFile · 0.90
isFlutterRepoAsyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected