MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / isTerminalAccessiblePath

Function isTerminalAccessiblePath

src/lib/openFolder.js:39–47  ·  view source on GitHub ↗
(url = "")

Source from the content-addressed store, hash-verified

37};
38
39const isTerminalAccessiblePath = (url = "") => {
40 if (isAcodeTerminalPublicSafUri(url)) return true;
41 const { alpineRoot, publicDir } = getTerminalPaths();
42 const cleanUrl = url.replace(/^file:\/\//, "");
43 if (cleanUrl.startsWith(alpineRoot) || cleanUrl.startsWith(publicDir)) {
44 return true;
45 }
46 return false;
47};
48
49const convertToProotPath = (url = "") => {
50 const { alpineRoot, publicDir } = getTerminalPaths();

Callers 1

handleContextmenuFunction · 0.85

Calls 2

getTerminalPathsFunction · 0.85

Tested by

no test coverage detected