Skip to main content

recentAPI

MS Code Extension API


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

core/extensionAPI/modules/workspace/recentAPI

Functions

createRecentAPI()

createRecentAPI(): object

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

Factory function to create the Recent API. Provides management for the workspace history (Recently Opened Projects).

Returns

addRecentWorkspace

addRecentWorkspace: (name, path) => Promise<void>

Adds a new project or workspace to the history.

Parameters
name

string

The display name of the project.

path

string

The absolute file system path of the workspace.

Returns

Promise<void>

Resolves when the workspace is added to persistence.

clearRecentWorkspaces

clearRecentWorkspaces: () => Promise<void>

Clears the entire recent workspace history.

Returns

Promise<void>

Resolves when the history is wiped.

getRecentWorkspaces

getRecentWorkspaces: () => RecentWorkspace[]

Retrieves the list of all recently opened workspaces.

Returns

RecentWorkspace[]

A list of recent workspace entries.