MCPcopy Create free account
hub / github.com/denoland/std / checkExistsSync

Function checkExistsSync

fs/unstable_remove_test.ts:26–36  ·  view source on GitHub ↗
(path: string | URL)

Source from the content-addressed store, hash-verified

24}
25
26function checkExistsSync(path: string | URL) {
27 try {
28 const stated = statSync(path);
29 return stated.isDirectory;
30 } catch (e) {
31 if (e instanceof NotFound) {
32 return false;
33 }
34 throw e;
35 }
36}
37
38Deno.test(
39 "remove() removes an existing and empty directory",

Callers 1

Calls 1

statSyncFunction · 0.90

Tested by

no test coverage detected