MCPcopy Index your code
hub / github.com/REditorSupport/vscode-R / readContent

Function readContent

src/util.ts:206–212  ·  view source on GitHub ↗
(file: PathLike | number, encoding?: string)

Source from the content-addressed store, hash-verified

204export function readContent(file: PathLike | number): Promise<Buffer> | undefined;
205export function readContent(file: PathLike | number, encoding: string): Promise<string> | undefined;
206export function readContent(file: PathLike | number, encoding?: string): Promise<string | Buffer> | undefined {
207 if (isGuestSession) {
208 return encoding === undefined ? rGuestService?.requestFileContent(file) : rGuestService?.requestFileContent(file, encoding);
209 } else {
210 return encoding === undefined ? readFile(file) : readFile(file, encoding);
211 }
212}
213
214
215export async function saveDocument(document: vscode.TextDocument): Promise<boolean> {

Callers 6

getTableHtmlFunction · 0.90
getListHtmlFunction · 0.90
getWebviewHtmlFunction · 0.90
refreshContentMethod · 0.90
updateGuestRequestFunction · 0.90
updateGuestPlotFunction · 0.90

Calls 1

requestFileContentMethod · 0.80

Tested by

no test coverage detected