MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / getLastNameFromPath

Function getLastNameFromPath

frontend/src/hooks/useFileManager.ts:232–237  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

230 };
231
232 const getLastNameFromPath = (path: string) => {
233 if (path === "/") return "/";
234 const cleanPath = path.endsWith("/") ? path.slice(0, -1) : path;
235 const parts = cleanPath.split("/").filter((part) => part !== "");
236 return parts.length > 0 ? parts[parts.length - 1] : "/";
237 };
238
239 const clipboard = ref<{
240 type: "copy" | "move";

Callers 2

updateBreadcrumbsFunction · 0.85
handleChangeDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected