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

Function stat

fs/unstable_stat.ts:27–37  ·  view source on GitHub ↗
(path: string | URL)

Source from the content-addressed store, hash-verified

25 * @returns A promise that resolves to a {@linkcode FileInfo} for the specified `path`.
26 */
27export async function stat(path: string | URL): Promise<FileInfo> {
28 if (isDeno) {
29 return Deno.stat(path);
30 } else {
31 try {
32 return toFileInfo(await getNodeFs().promises.stat(path));
33 } catch (error) {
34 throw mapError(error);
35 }
36 }
37}
38
39/**
40 * Synchronously returns a {@linkcode FileInfo} for the specified

Calls 4

toFileInfoFunction · 0.90
getNodeFsFunction · 0.90
mapErrorFunction · 0.90
statMethod · 0.65

Tested by

no test coverage detected