MCPcopy Create free account
hub / github.com/Effect-TS/effect / typeOf

Function typeOf

packages/effect/src/encoding/Tar.ts:610–614  ·  view source on GitHub ↗
(typeflag: string, path: string)

Source from the content-addressed store, hash-verified

608}
609
610const typeOf = (typeflag: string, path: string): EntryType => {
611 // Legacy archives mark directories with a trailing slash only
612 if (typeflag === "\0") return path.endsWith("/") ? "Directory" : "File"
613 return types[typeflag] ?? "Other"
614}
615
616const typeflagOf = (header: Header): string => header.type === "Other" ? header.typeflag : typeflags[header.type]
617

Callers 1

toHeaderMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected