MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / makeSourceFile

Method makeSourceFile

src/notebooks/export/exportBase.node.ts:125–134  ·  view source on GitHub ↗
(target: Uri, contents: string, tempDir: TemporaryDirectory)

Source from the content-addressed store, hash-verified

123 }
124
125 private async makeSourceFile(target: Uri, contents: string, tempDir: TemporaryDirectory): Promise<Uri> {
126 // Creates a temporary file with the same base name as the target file
127 const fileName = path.basename(target.fsPath, path.extname(target.fsPath));
128 const sourceFilePath = await new ExportUtilNode().makeFileInDirectory(
129 contents,
130 `${fileName}.ipynb`,
131 tempDir.path
132 );
133 return Uri.file(sourceFilePath);
134 }
135
136 protected async getExecutionService(
137 source: Uri,

Callers 1

executeCommandMethod · 0.95

Calls 4

makeFileInDirectoryMethod · 0.80
basenameMethod · 0.65
extnameMethod · 0.65
fileMethod · 0.45

Tested by

no test coverage detected