An event that is fired when files are going to be deleted.
To make modifications to the workspace before the files are deleted,
call the {@link FileWillCreateEvent.waitUntil waitUntil}-function with a
thenable that resolves to a {@link WorkspaceEdit workspace edit}.
An event that is fired when files are going to be deleted.
To make modifications to the workspace before the files are deleted,
call the {@link FileWillCreateEvent.waitUntil `waitUntil`}-function with a
thenable that resolves to a {@link WorkspaceEdit workspace edit}.(files file-will-delete-event)The files that are going to be deleted.
The files that are going to be deleted.
(token file-will-delete-event)A cancellation token.
A cancellation token.
(wait-until file-will-delete-event thenable)Allows to pause the event and to apply a {@link WorkspaceEdit 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);
})
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
Allows to pause the event and to apply a {@link WorkspaceEdit 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.
**Parameters:**
- `thenable`: `Thenable<any>` - A thenable that delays saving.
**Returns:** `void`cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |