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

Function existsAndIsFileAsync

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

Source from the content-addressed store, hash-verified

179}
180
181export async function existsAndIsFileAsync(file: string): Promise<boolean> {
182 try {
183 const stat = await fs.promises.stat(file);
184 return stat?.isFile() ?? false;
185 } catch {
186 return false;
187 }
188}
189
190export async function existsAndIsDirectoryAsync(file: string): Promise<boolean> {
191 try {

Callers 4

fs.test.tsFile · 0.90
hasPubspecAsyncFunction · 0.85
isFlutterRepoAsyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected