$ModuleWorkspace class
- Available extensions
- Annotations
-
- @JS('vscode.workspace')
- @staticInterop
Constructors
Properties
- fs → FileSystem
-
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
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 orvscode.workspace.fs.stat(anotherUri)
returns the meta data for a file.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isTrusted → bool
-
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
When true, the user has explicitly trusted the contents of the workspace.no setter - name → String?
-
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
The name of the workspace.undefined
when no workspace has been opened.no setter -
notebookDocuments
→ List<
NotebookDocument> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
All notebook documents currently known to the editor.no setter -
onDidChangeConfiguration
→ Event<
ConfigurationChangeEvent> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when the {@link WorkspaceConfigurationconfiguration} changed.no setter -
onDidChangeNotebookDocument
→ Event<
NotebookDocumentChangeEvent> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when a {@link NotebookDocumentnotebook} has changed.no setter -
onDidChangeTextDocument
→ Event<
TextDocumentChangeEvent> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
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> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when a workspace folder is added or removed.no setter -
onDidCloseNotebookDocument
→ Event<
NotebookDocument> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when a {@link NotebookDocumentnotebook} is disposed.no setter -
onDidCloseTextDocument
→ Event<
TextDocument> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
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> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when files have been created.no setter -
onDidDeleteFiles
→ Event<
FileDeleteEvent> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when files have been deleted.no setter -
onDidGrantWorkspaceTrust
→ Event<
void> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
Event that fires when the current workspace has been trusted.no setter -
onDidOpenNotebookDocument
→ Event<
NotebookDocument> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when a {@link NotebookDocumentnotebook} is opened.no setter -
onDidOpenTextDocument
→ Event<
TextDocument> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
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> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when files have been renamed.no setter -
onDidSaveNotebookDocument
→ Event<
NotebookDocument> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when a {@link NotebookDocumentnotebook} is saved.no setter -
onDidSaveTextDocument
→ Event<
TextDocument> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when a {@link TextDocumenttext document} is saved to disk.no setter -
onWillCreateFiles
→ Event<
FileWillCreateEvent> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when files are being created.no setter -
onWillDeleteFiles
→ Event<
FileWillDeleteEvent> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when files are being deleted.no setter -
onWillRenameFiles
→ Event<
FileWillRenameEvent> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when files are being renamed.no setter -
onWillSaveNotebookDocument
→ Event<
NotebookDocumentWillSaveEvent> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
An event that is emitted when a {@link NotebookDocumentnotebook document} will be saved to disk.no setter -
onWillSaveTextDocument
→ Event<
TextDocumentWillSaveEvent> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
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})
-
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
Overload accessor: $1, $2no setter - openTextDocument → ({Future Function(Uri uri) $1, Future Function(String fileName) $2, Future Function([IInline65? options]) $3})
-
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
Overload accessor: $1, $2, $3no setter - rootPath → String?
-
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
The uri of the first entry of {@linkcode workspace.workspaceFoldersworkspaceFolders} asstring
.undefined
if there is no first entry.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
textDocuments
→ List<
TextDocument> -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
All text documents currently known to the editor.no setter - workspaceFile → Uri?
-
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
The location of the workspace file, for example:no setter -
workspaceFolders
→ List<
WorkspaceFolder> ? -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
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 -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
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 -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
Returns a path that is relative to the workspace folder or folders. -
createFileSystemWatcher(
Object globPattern, [bool? ignoreCreateEvents, bool? ignoreChangeEvents, bool? ignoreDeleteEvents]) → FileSystemWatcher -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
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 -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
Find files across all {@link workspace.workspaceFoldersworkspace folders} in the workspace. -
getConfiguration(
[String? section, Object? scope]) → WorkspaceConfiguration -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
Get a workspace configuration object. -
getWorkspaceFolder(
Uri uri) → WorkspaceFolder? -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
Returns the {@link WorkspaceFolderworkspace folder} that contains a given uri. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerFileSystemProvider(
String scheme, FileSystemProvider provider, [IInline66? options]) → Disposable -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
Register a filesystem provider for a given scheme, e.g.ftp
. -
registerNotebookSerializer(
String notebookType, NotebookSerializer serializer, [NotebookDocumentContentOptions? options]) → Disposable -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
Register a {@link NotebookSerializernotebook serializer}. -
registerTaskProvider(
String type, TaskProvider< Task> provider) → Disposable -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
Register a task provider. -
registerTextDocumentContentProvider(
String scheme, TextDocumentContentProvider provider) → Disposable -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
Register a text document content provider. -
saveAll(
[bool? includeUntitled]) → Future -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
Save all dirty files. -
toString(
) → String -
A string representation of this object.
inherited
-
updateWorkspaceFolders(
num start, [num? deleteCount, Iterable? workspaceFoldersToAdd]) → bool -
Available on $ModuleWorkspace, provided by the $ModuleWorkspace$Typings extension
This method replacesdeleteCount
{@link workspace.workspaceFoldersworkspace folders} starting at indexstart
by an optional set ofworkspaceFoldersToAdd
on thevscode.workspace.workspaceFolders
array. This "splice" behavior can be used to add, remove and change workspace folders in a single operation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited