MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / assertGrantedPath

Function assertGrantedPath

desktop/runtime/attachment-file-tools.ts:87–90  ·  view source on GitHub ↗
(filePath: string, grants: AttachmentGrant, cwd: string)

Source from the content-addressed store, hash-verified

85}
86
87async function assertGrantedPath(filePath: string, grants: AttachmentGrant, cwd: string) {
88 if (await isGrantedPath(filePath, grants, cwd)) return
89 throw new Error(`Path is not an attached file or inside an attached folder: ${filePath}`)
90}
91
92async function assertGrantedDirectoryPath(filePath: string, grants: AttachmentGrant, cwd: string) {
93 if (await isGrantedDirectoryPath(filePath, grants, cwd)) return

Callers 1

Calls 1

isGrantedPathFunction · 0.85

Tested by

no test coverage detected