$ModuleWorkspace$Typings extension

on

Properties

fs FileSystem
A {@link FileSystemfile system} instance that allows to interact with local and remote files, e.g. vscode.workspace.fs.readDirectory(someUri) allows to retrieve all entries of a directory or vscode.workspace.fs.stat(anotherUri) returns the meta data for a file.
no setter
isTrusted bool
When true, the user has explicitly trusted the contents of the workspace.
no setter
name String?
The name of the workspace. undefined when no workspace has been opened.
no setter
notebookDocuments List<NotebookDocument>
All notebook documents currently known to the editor.
no setter
onDidChangeConfiguration Event<ConfigurationChangeEvent>
An event that is emitted when the {@link WorkspaceConfigurationconfiguration} changed.
no setter
onDidChangeNotebookDocument Event<NotebookDocumentChangeEvent>
An event that is emitted when a {@link NotebookDocumentnotebook} has changed.
no setter
onDidChangeTextDocument Event<TextDocumentChangeEvent>
An event that is emitted when a {@link TextDocumenttext document} is changed. This usually happens when the {@link TextDocument.getTextcontents} changes but also when other things like the {@link TextDocument.isDirtydirty}-state changes.
no setter
onDidChangeWorkspaceFolders Event<WorkspaceFoldersChangeEvent>
An event that is emitted when a workspace folder is added or removed.
no setter
onDidCloseNotebookDocument Event<NotebookDocument>
An event that is emitted when a {@link NotebookDocumentnotebook} is disposed.
no setter
onDidCloseTextDocument Event<TextDocument>
An event that is emitted when a {@link TextDocumenttext document} is disposed or when the language id of a text document {@link languages.setTextDocumentLanguagehas been changed}.
no setter
onDidCreateFiles Event<FileCreateEvent>
An event that is emitted when files have been created.
no setter
onDidDeleteFiles Event<FileDeleteEvent>
An event that is emitted when files have been deleted.
no setter
onDidGrantWorkspaceTrust Event<void>
Event that fires when the current workspace has been trusted.
no setter
onDidOpenNotebookDocument Event<NotebookDocument>
An event that is emitted when a {@link NotebookDocumentnotebook} is opened.
no setter
onDidOpenTextDocument Event<TextDocument>
An event that is emitted when a {@link TextDocumenttext document} is opened or when the language id of a text document {@link languages.setTextDocumentLanguagehas been changed}.
no setter
onDidRenameFiles Event<FileRenameEvent>
An event that is emitted when files have been renamed.
no setter
onDidSaveNotebookDocument Event<NotebookDocument>
An event that is emitted when a {@link NotebookDocumentnotebook} is saved.
no setter
onDidSaveTextDocument Event<TextDocument>
An event that is emitted when a {@link TextDocumenttext document} is saved to disk.
no setter
onWillCreateFiles Event<FileWillCreateEvent>
An event that is emitted when files are being created.
no setter
onWillDeleteFiles Event<FileWillDeleteEvent>
An event that is emitted when files are being deleted.
no setter
onWillRenameFiles Event<FileWillRenameEvent>
An event that is emitted when files are being renamed.
no setter
onWillSaveNotebookDocument Event<NotebookDocumentWillSaveEvent>
An event that is emitted when a {@link NotebookDocumentnotebook document} will be saved to disk.
no setter
onWillSaveTextDocument Event<TextDocumentWillSaveEvent>
An event that is emitted when a {@link TextDocumenttext document} will be saved to disk.
no setter
openNotebookDocument → ({Future Function(Uri uri) $1, Future Function(String notebookType, [NotebookData? content]) $2})
Overload accessor: $1, $2
no setter
openTextDocument → ({Future Function(Uri uri) $1, Future Function(String fileName) $2, Future Function([IInline65? options]) $3})
Overload accessor: $1, $2, $3
no setter
rootPath String?
The uri of the first entry of {@linkcode workspace.workspaceFoldersworkspaceFolders} as string. undefined if there is no first entry.
no setter
textDocuments List<TextDocument>
All text documents currently known to the editor.
no setter
workspaceFile Uri?
The location of the workspace file, for example:
no setter
workspaceFolders List<WorkspaceFolder>?
List of workspace folders (0-N) that are open in the editor. undefined when no workspace has been opened.
no setter

Methods

applyEdit(WorkspaceEdit edit, [WorkspaceEditMetadata? metadata]) Future
Make changes to one or many resources or create, delete, and rename resources as defined by the given {@link WorkspaceEditworkspace edit}.
asRelativePath(Object pathOrUri, [bool? includeWorkspaceFolder]) String
Returns a path that is relative to the workspace folder or folders.
createFileSystemWatcher(Object globPattern, [bool? ignoreCreateEvents, bool? ignoreChangeEvents, bool? ignoreDeleteEvents]) FileSystemWatcher
Creates a file system watcher that is notified on file events (create, change, delete) depending on the parameters provided.
findFiles(Object include, [Object? exclude, num? maxResults, CancellationToken? token]) Future
Find files across all {@link workspace.workspaceFoldersworkspace folders} in the workspace.
getConfiguration([String? section, Object? scope]) WorkspaceConfiguration
Get a workspace configuration object.
getWorkspaceFolder(Uri uri) WorkspaceFolder?
Returns the {@link WorkspaceFolderworkspace folder} that contains a given uri.
registerFileSystemProvider(String scheme, FileSystemProvider provider, [IInline66? options]) Disposable
Register a filesystem provider for a given scheme, e.g. ftp.
registerNotebookSerializer(String notebookType, NotebookSerializer serializer, [NotebookDocumentContentOptions? options]) Disposable
Register a {@link NotebookSerializernotebook serializer}.
registerTaskProvider(String type, TaskProvider<Task> provider) Disposable
Register a task provider.
registerTextDocumentContentProvider(String scheme, TextDocumentContentProvider provider) Disposable
Register a text document content provider.
saveAll([bool? includeUntitled]) Future
Save all dirty files.
updateWorkspaceFolders(num start, [num? deleteCount, Iterable? workspaceFoldersToAdd]) bool
This method replaces deleteCount {@link workspace.workspaceFoldersworkspace folders} starting at index start by an optional set of workspaceFoldersToAdd on the vscode.workspace.workspaceFolders array. This "splice" behavior can be used to add, remove and change workspace folders in a single operation.