Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface FileWillRenameEvent

An event that is fired when files are going to be renamed.

To make modifications to the workspace before the files are renamed, call the `waitUntil-function with a thenable that resolves to a workspace edit.

层级

  • FileWillRenameEvent

索引

Properties(1)

Methods(1)

Properties(1)

Readonly files

files: readonly { oldUri: Uri; newUri: Uri }[]

The files that are going to be renamed.

Methods(1)

waitUntil

  • Allows to pause the event and to apply a workspace edit.

    Note: This function can only be called during event dispatch and not in an asynchronous manner:

    workspace.onWillCreateFiles(event => {
        // async, will *throw* an error
        setTimeout(() => event.waitUntil(promise));
    
        // sync, OK
        event.waitUntil(promise);
    })
    

    Parameters

    Returns void

  • Allows to pause the event until the provided thenable resolves.

    Note: This function can only be called during event dispatch.

    Parameters

    • thenable: Thenable<any>

      A thenable that delays saving.

    Returns void

友链:VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc. Maintained by 洛竹