mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
add (internal) api for onWillSave #43768
This commit is contained in:
@@ -698,6 +698,7 @@ export interface FileSystemEvents {
|
||||
export interface ExtHostFileSystemEventServiceShape {
|
||||
$onFileEvent(events: FileSystemEvents): void;
|
||||
$onFileRename(oldUri: UriComponents, newUri: UriComponents): void;
|
||||
$onWillRename(oldUri: UriComponents, newUri: UriComponents): TPromise<any>;
|
||||
}
|
||||
|
||||
export interface ObjectIdentifier {
|
||||
|
||||
@@ -10,6 +10,7 @@ import URI, { UriComponents } from 'vs/base/common/uri';
|
||||
import * as vscode from 'vscode';
|
||||
import { ExtHostFileSystemEventServiceShape, FileSystemEvents } from './extHost.protocol';
|
||||
import { Disposable } from './extHostTypes';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
|
||||
class FileSystemWatcher implements vscode.FileSystemWatcher {
|
||||
|
||||
@@ -114,4 +115,8 @@ export class ExtHostFileSystemEventService implements ExtHostFileSystemEventServ
|
||||
$onFileRename(oldUri: UriComponents, newUri: UriComponents) {
|
||||
this._onDidRenameFile.fire(Object.freeze({ oldUri: URI.revive(oldUri), newUri: URI.revive(newUri) }));
|
||||
}
|
||||
|
||||
$onWillRename(oldUri: UriComponents, newUri: UriComponents): TPromise<any> {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user