MCPcopy Create free account
hub / github.com/dethcrypto/dethcode / delete

Method delete

packages/ethereum-viewer/src/fs/fileSystemProvider.ts:140–154  ·  view source on GitHub ↗
(uri: vscode.Uri)

Source from the content-addressed store, hash-verified

138 }
139
140 delete(uri: vscode.Uri): void {
141 const dirname = uri.with({ path: path.posix.dirname(uri.path) });
142 const basename = path.posix.basename(uri.path);
143 const parent = this._lookupAsDirectory(dirname, false);
144 if (!parent.entries.has(basename)) {
145 throw vscode.FileSystemError.FileNotFound(uri);
146 }
147 parent.entries.delete(basename);
148 parent.mtime = Date.now();
149 parent.size -= 1;
150 this._fireSoon(
151 { type: vscode.FileChangeType.Changed, uri: dirname },
152 { uri, type: vscode.FileChangeType.Deleted }
153 );
154 }
155
156 createDirectory(uri: vscode.Uri): void {
157 this._createDirectory(uri);

Callers

nothing calls this directly

Calls 3

_lookupAsDirectoryMethod · 0.95
_fireSoonMethod · 0.95
deleteMethod · 0.65

Tested by

no test coverage detected