MCPcopy Index your code
hub / github.com/LeetCode-OpenSource/vscode-leetcode / isSubFolder

Function isSubFolder

src/utils/workspaceUtils.ts:80–86  ·  view source on GitHub ↗
(from: string, to: string)

Source from the content-addressed store, hash-verified

78}
79
80function isSubFolder(from: string, to: string): boolean {
81 const relative: string = path.relative(from, to);
82 if (relative === "") {
83 return true;
84 }
85 return !relative.startsWith("..") && !path.isAbsolute(relative);
86}
87
88async function determineLeetCodeFolder(): Promise<string> {
89 let result: string;

Callers 1

selectWorkspaceFolderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected