A workspace edit is a collection of textual and files changes for multiple resources and documents.

Use the workspace.applyEdit applyEdit-function to apply a workspace edit.

Implements

Constructors

Properties

_edits: WorkspaceEditEntry[] = ...

Accessors

Methods

  • Create a regular file.

    Parameters

    • uri: Uri

      Uri of the new file..

    • Optional options: {
          ignoreIfExists?: boolean;
          overwrite?: boolean;
      }

      Defines if an existing file should be overwritten or be ignored. When overwrite and ignoreIfExists are both set overwrite wins.

      • Optional ignoreIfExists?: boolean
      • Optional overwrite?: boolean
    • Optional metadata: WorkspaceEditMetadata

      Optional metadata for the entry.

    Returns void

  • Rename a file or folder.

    Parameters

    • from: Uri

      The existing file.

    • to: Uri

      The new location.

    • Optional options: {
          ignoreIfExists?: boolean;
          overwrite?: boolean;
      }

      Defines if existing files should be overwritten or be ignored. When overwrite and ignoreIfExists are both set overwrite wins.

      • Optional ignoreIfExists?: boolean
      • Optional overwrite?: boolean
    • Optional metadata: WorkspaceEditMetadata

      Optional metadata for the entry.

    Returns void