MCPcopy Create free account
hub / github.com/microsoft/SandDance / getHdfsFileAsString

Function getHdfsFileAsString

extensions/azdata-sanddance/src/extension.ts:144–158  ·  view source on GitHub ↗
(commandContext: azdata.ObjectExplorerContext)

Source from the content-addressed store, hash-verified

142}
143
144export async function getHdfsFileAsString(commandContext: azdata.ObjectExplorerContext): Promise<{ contents: string, fsUriPath: string } | undefined> {
145 const extension = vscode.extensions.getExtension('Microsoft.mssql');
146 if (extension) {
147 const extensionApi: MssqlExtensionApi = extension.exports;
148 const browser = extensionApi.getMssqlObjectExplorerBrowser();
149 const node: IFileNode = await browser.getNode<IFileNode>(commandContext);
150 const contents = await node.getFileContentsAsString();
151 if (contents !== undefined) {
152 return {
153 contents,
154 fsUriPath: node.getNodeInfo().label,
155 };
156 }
157 }
158}
159
160export function deactivate() {
161 vscode.commands.executeCommand('setContext', 'showVisualizer', false);

Callers 1

Calls 3

getNodeInfoMethod · 0.80

Tested by

no test coverage detected