MCPcopy Create free account
hub / github.com/cloudflare/agents / getBasename

Function getBasename

packages/shell/src/filesystem.ts:1597–1601  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

1595}
1596
1597function getBasename(path: string): string {
1598 const normalized = normalizePath(path);
1599 if (normalized === "/") return "";
1600 return normalized.slice(normalized.lastIndexOf("/") + 1);
1601}
1602
1603function toFileInfo(r: {
1604 path: string;

Callers 6

symlinkMethod · 0.85
writeFileBytesMethod · 0.85
writeFileMethod · 0.85
mkdirMethod · 0.85
mvMethod · 0.85
ensureParentDirMethod · 0.85

Calls 1

normalizePathFunction · 0.70

Tested by

no test coverage detected