FileWillRenameEvent
interfaceAn 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.
Import
import { FileWillRenameEvent } from '@modular/sdk/view';Members3
- files
ReadonlyArray<{ /** * The old uri of a file. */ readonly oldUri: Uri; /** * The new uri of a file. */ readonly newUri: Uri; }>The files that are going to be renamed.
- token
CancellationTokenA cancellation token.
- waitUntil()
(thenable: Thenable<WorkspaceEdit>) => void | (thenable: Thenable<any>) => voidAllows 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: ```ts workspace.onWillCreateFiles(event => { // async, will *throw* an error setTimeout(() => event.waitUntil(promise)); // sync, OK event.waitUntil(promise); }) ``` Allows to pause the event until the provided thenable resolves. *Note:* This function can only be called during event dispatch.