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

Method assertInsideWorkspace

daemon/src/service/system_file.ts:102–105  ·  view source on GitHub ↗
(fileNameOrPath: string)

Source from the content-addressed store, hash-verified

100 }
101
102 assertInsideWorkspace(fileNameOrPath: string) {
103 const absPath = this.toAbsolutePath(fileNameOrPath);
104 if (this.isOutsideWorkspace(absPath)) throw new Error(ERROR_MSG_01);
105 }
106
107 check(destPath: string) {
108 if (this.isRootTopRath()) return true;

Callers 2

checkPathMethod · 0.95
listMethod · 0.95

Calls 2

toAbsolutePathMethod · 0.95
isOutsideWorkspaceMethod · 0.95

Tested by

no test coverage detected