MCPcopy Create free account
hub / github.com/Snapchat/Valdi / registerInMemoryFile

Method registerInMemoryFile

compiler/companion/src/Workspace.ts:215–219  ·  view source on GitHub ↗
(fileName: string, fileContent: string)

Source from the content-addressed store, hash-verified

213 }
214
215 registerInMemoryFile(fileName: string, fileContent: string): void {
216 const resolvedPath = this.project.resolvePath(fileName);
217 this.importPathResolver.registerAlias(resolvedPath);
218 this.project.setFileContentAtResolvedPath(resolvedPath, fileContent);
219 }
220
221 registerDiskFile(fileName: string, absoluteDiskPath: string): void {
222 const resolvedPath = this.project.resolvePath(fileName);

Callers 2

compileAsIRStringFunction · 0.95
compileAsCFunction · 0.95

Calls 3

registerAliasMethod · 0.80
resolvePathMethod · 0.45

Tested by 2

compileAsIRStringFunction · 0.76
compileAsCFunction · 0.76