MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / delete

Method delete

src/filesystem/transaction.ts:126–142  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

124 await fs.mkdir(path.dirname(abs), { recursive: true });
125 await writeFileAtomic(abs, content, { encoding: 'utf-8' });
126
127 this.ops.push({
128 operation: isCreate ? 'create' : 'write',
129 path: abs,
130 beforeHash,
131 afterHash,
132 beforeContent: beforeContent ?? undefined,
133 afterContent: content,
134 });
135
136 logger.debug('Transaction write', { txnId: this.id, path: abs, isCreate });
137 }
138
139 async delete(filePath: string): Promise<void> {
140 this.ensureOpen();
141 const abs = path.resolve(filePath);
142 // Scope gate — same contract as write() above.
143 {
144 const denial = checkWriteScope(abs);
145 if (denial) {

Callers 15

expandToolPatternsFunction · 0.80
unregisterMethod · 0.80
unregisterByPrefixMethod · 0.80
parseIssuesFunction · 0.80
executeMethod · 0.80
clearTodosFunction · 0.80
evictOldestMethod · 0.80
setSessionRoleOverrideFunction · 0.80
invalidateSymbolGraphFunction · 0.80
controlsForMethod · 0.80
runAndDrainMethod · 0.80
onMessageMethod · 0.80

Calls 5

ensureOpenMethod · 0.95
resolveMethod · 0.80
storeBlobMethod · 0.80
hashContentFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected