Skip to main content

workspaceInfoAPI

MS Code Extension API


MS Code Extension API / core/extensionAPI/modules/workspace/workspaceInfoAPI

core/extensionAPI/modules/workspace/workspaceInfoAPI

Functions

createWorkspaceInfoAPI()

createWorkspaceInfoAPI(): object

Defined in: core/extensionAPI/modules/workspace/workspaceInfoAPI.ts:9

Factory function to create the Workspace Info API. Exposes metadata regarding the currently active workspace/folder.

Returns

name
Get Signature

get name(): string | undefined

The name of the current workspace, derived from the last segment of the workspace path.

Returns

string | undefined

The folder name, or undefined if no workspace is active.

workspacePath
Get Signature

get workspacePath(): string | undefined

The absolute path of the currently open workspace (e.g., '/sdcard/Projects/MyApp').

Returns

string | undefined

The path string, or undefined if no folder is open.