提交 bf615555 编写于 作者: J Johannes Rieken

talk about `File`, not `Entry` #47475

上级 00b0acb9
......@@ -65,26 +65,26 @@ declare module 'vscode' {
* Create an error to signal that a file or folder wasn't found.
* @param messageOrUri Message or uri.
*/
static EntryNotFound(messageOrUri?: string | Uri): FileSystemError;
static FileNotFound(messageOrUri?: string | Uri): FileSystemError;
/**
* Create an error to signal that a file or folder already exists, e.g. when
* creating but not overwriting a file.
* @param messageOrUri Message or uri.
*/
static EntryExists(messageOrUri?: string | Uri): FileSystemError;
static FileExists(messageOrUri?: string | Uri): FileSystemError;
/**
* Create an error to signal that a file is not a folder.
* @param messageOrUri Message or uri.
*/
static EntryNotADirectory(messageOrUri?: string | Uri): FileSystemError;
static FileNotADirectory(messageOrUri?: string | Uri): FileSystemError;
/**
* Create an error to signal that a file is a folder.
* @param messageOrUri Message or uri.
*/
static EntryIsADirectory(messageOrUri?: string | Uri): FileSystemError;
static FileIsADirectory(messageOrUri?: string | Uri): FileSystemError;
/**
* Creates a new filesystem error.
......
......@@ -1866,17 +1866,17 @@ export enum DeprecatedFileType {
export class FileSystemError extends Error {
static EntryExists(messageOrUri?: string | URI): FileSystemError {
return new FileSystemError(messageOrUri, 'EntryExists', FileSystemError.EntryExists);
static FileExists(messageOrUri?: string | URI): FileSystemError {
return new FileSystemError(messageOrUri, 'EntryExists', FileSystemError.FileExists);
}
static EntryNotFound(messageOrUri?: string | URI): FileSystemError {
return new FileSystemError(messageOrUri, 'EntryNotFound', FileSystemError.EntryNotFound);
static FileNotFound(messageOrUri?: string | URI): FileSystemError {
return new FileSystemError(messageOrUri, 'EntryNotFound', FileSystemError.FileNotFound);
}
static EntryNotADirectory(messageOrUri?: string | URI): FileSystemError {
return new FileSystemError(messageOrUri, 'EntryNotADirectory', FileSystemError.EntryNotADirectory);
static FileNotADirectory(messageOrUri?: string | URI): FileSystemError {
return new FileSystemError(messageOrUri, 'EntryNotADirectory', FileSystemError.FileNotADirectory);
}
static EntryIsADirectory(messageOrUri?: string | URI): FileSystemError {
return new FileSystemError(messageOrUri, 'EntryIsADirectory', FileSystemError.EntryIsADirectory);
static FileIsADirectory(messageOrUri?: string | URI): FileSystemError {
return new FileSystemError(messageOrUri, 'EntryIsADirectory', FileSystemError.FileIsADirectory);
}
constructor(uriOrMessage?: string | URI, code?: string, terminator?: Function) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册