Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
9ba606df
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9ba606df
编写于
6月 27, 2018
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add recrusive-flag to deleteFile-function, #52941
上级
39b91f6c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
9 deletion
+17
-9
src/vs/editor/common/modes.ts
src/vs/editor/common/modes.ts
+1
-1
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+1
-0
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+1
-1
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+2
-2
src/vs/workbench/api/node/extHostTypes.ts
src/vs/workbench/api/node/extHostTypes.ts
+11
-5
src/vs/workbench/services/bulkEdit/electron-browser/bulkEditService.ts
...nch/services/bulkEdit/electron-browser/bulkEditService.ts
+1
-0
未找到文件。
src/vs/editor/common/modes.ts
浏览文件 @
9ba606df
...
@@ -906,7 +906,7 @@ export function isResourceTextEdit(thing: any): thing is ResourceTextEdit {
...
@@ -906,7 +906,7 @@ export function isResourceTextEdit(thing: any): thing is ResourceTextEdit {
export
interface
ResourceFileEdit
{
export
interface
ResourceFileEdit
{
oldUri
:
URI
;
oldUri
:
URI
;
newUri
:
URI
;
newUri
:
URI
;
options
:
{
overwrite
?:
boolean
,
ignoreIfExists
?:
boolean
};
options
:
{
overwrite
?:
boolean
,
ignoreIfExists
?:
boolean
,
recursive
?:
boolean
};
}
}
export
interface
ResourceTextEdit
{
export
interface
ResourceTextEdit
{
...
...
src/vs/monaco.d.ts
浏览文件 @
9ba606df
...
@@ -5191,6 +5191,7 @@ declare namespace monaco.languages {
...
@@ -5191,6 +5191,7 @@ declare namespace monaco.languages {
options
:
{
options
:
{
overwrite
?:
boolean
;
overwrite
?:
boolean
;
ignoreIfExists
?:
boolean
;
ignoreIfExists
?:
boolean
;
recursive
?:
boolean
;
};
};
}
}
...
...
src/vs/vscode.proposed.d.ts
浏览文件 @
9ba606df
...
@@ -817,7 +817,7 @@ declare module 'vscode' {
...
@@ -817,7 +817,7 @@ declare module 'vscode' {
*
*
* @param uri The uri of the file that is to be deleted.
* @param uri The uri of the file that is to be deleted.
*/
*/
deleteFile
(
uri
:
Uri
):
void
;
deleteFile
(
uri
:
Uri
,
options
?:
{
recursive
?:
boolean
}
):
void
;
/**
/**
* Rename a file or folder.
* Rename a file or folder.
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
9ba606df
...
@@ -29,7 +29,7 @@ import { IConfig, IAdapterExecutable, ITerminalSettings } from 'vs/workbench/par
...
@@ -29,7 +29,7 @@ import { IConfig, IAdapterExecutable, ITerminalSettings } from 'vs/workbench/par
import
{
IQuickPickItem
,
IPickOptions
,
IQuickInputButton
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
IQuickPickItem
,
IPickOptions
,
IQuickInputButton
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
SaveReason
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
SaveReason
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
TextEditorCursorStyle
}
from
'
vs/editor/common/config/editorOptions
'
;
import
{
TextEditorCursorStyle
}
from
'
vs/editor/common/config/editorOptions
'
;
import
{
EndOfLine
,
TextEditorLineNumbersStyle
}
from
'
vs/workbench/api/node/extHostTypes
'
;
import
{
EndOfLine
,
TextEditorLineNumbersStyle
,
IFileOperationOptions
}
from
'
vs/workbench/api/node/extHostTypes
'
;
import
{
TaskSet
}
from
'
vs/workbench/parts/tasks/common/tasks
'
;
import
{
TaskSet
}
from
'
vs/workbench/parts/tasks/common/tasks
'
;
...
@@ -774,7 +774,7 @@ export interface WorkspaceSymbolsDto extends IdObject {
...
@@ -774,7 +774,7 @@ export interface WorkspaceSymbolsDto extends IdObject {
export
interface
ResourceFileEditDto
{
export
interface
ResourceFileEditDto
{
oldUri
:
UriComponents
;
oldUri
:
UriComponents
;
newUri
:
UriComponents
;
newUri
:
UriComponents
;
options
:
{
overwrite
?:
boolean
,
ignoreIfExists
?:
boolean
}
;
options
:
IFileOperationOptions
;
}
}
export
interface
ResourceTextEditDto
{
export
interface
ResourceTextEditDto
{
...
...
src/vs/workbench/api/node/extHostTypes.ts
浏览文件 @
9ba606df
...
@@ -495,11 +495,17 @@ export class TextEdit {
...
@@ -495,11 +495,17 @@ export class TextEdit {
}
}
export
interface
IFileOperationOptions
{
overwrite
?:
boolean
;
ignoreIfExists
?:
boolean
;
recursive
?:
boolean
;
}
export
interface
IFileOperation
{
export
interface
IFileOperation
{
_type
:
1
;
_type
:
1
;
from
:
URI
;
from
:
URI
;
to
:
URI
;
to
:
URI
;
options
?:
{
overwrite
?:
boolean
,
ignoreIfExists
?:
boolean
;
}
;
options
?:
IFileOperationOptions
;
}
}
export
interface
IFileTextEdit
{
export
interface
IFileTextEdit
{
...
@@ -520,8 +526,8 @@ export class WorkspaceEdit implements vscode.WorkspaceEdit {
...
@@ -520,8 +526,8 @@ export class WorkspaceEdit implements vscode.WorkspaceEdit {
this
.
_edits
.
push
({
_type
:
1
,
from
:
undefined
,
to
:
uri
,
options
});
this
.
_edits
.
push
({
_type
:
1
,
from
:
undefined
,
to
:
uri
,
options
});
}
}
deleteFile
(
uri
:
vscode
.
Uri
):
void
{
deleteFile
(
uri
:
vscode
.
Uri
,
options
?:
{
recursive
?:
boolean
}
):
void
{
this
.
_edits
.
push
({
_type
:
1
,
from
:
uri
,
to
:
undefined
});
this
.
_edits
.
push
({
_type
:
1
,
from
:
uri
,
to
:
undefined
,
options
});
}
}
replace
(
uri
:
URI
,
range
:
Range
,
newText
:
string
):
void
{
replace
(
uri
:
URI
,
range
:
Range
,
newText
:
string
):
void
{
...
@@ -593,8 +599,8 @@ export class WorkspaceEdit implements vscode.WorkspaceEdit {
...
@@ -593,8 +599,8 @@ export class WorkspaceEdit implements vscode.WorkspaceEdit {
return
values
(
textEdits
);
return
values
(
textEdits
);
}
}
_allEntries
():
([
URI
,
TextEdit
[]]
|
[
URI
,
URI
,
{
overwrite
?:
boolean
,
ignoreIfExists
?:
boolean
}
])[]
{
_allEntries
():
([
URI
,
TextEdit
[]]
|
[
URI
,
URI
,
IFileOperationOptions
])[]
{
let
res
:
([
URI
,
TextEdit
[]]
|
[
URI
,
URI
,
{
overwrite
?:
boolean
,
ignoreIfExists
?:
boolean
}
])[]
=
[];
let
res
:
([
URI
,
TextEdit
[]]
|
[
URI
,
URI
,
IFileOperationOptions
])[]
=
[];
for
(
let
edit
of
this
.
_edits
)
{
for
(
let
edit
of
this
.
_edits
)
{
if
(
edit
.
_type
===
1
)
{
if
(
edit
.
_type
===
1
)
{
res
.
push
([
edit
.
from
,
edit
.
to
,
edit
.
options
]);
res
.
push
([
edit
.
from
,
edit
.
to
,
edit
.
options
]);
...
...
src/vs/workbench/services/bulkEdit/electron-browser/bulkEditService.ts
浏览文件 @
9ba606df
...
@@ -339,6 +339,7 @@ export class BulkEdit {
...
@@ -339,6 +339,7 @@ export class BulkEdit {
if
(
edit
.
newUri
&&
edit
.
oldUri
)
{
if
(
edit
.
newUri
&&
edit
.
oldUri
)
{
await
this
.
_textFileService
.
move
(
edit
.
oldUri
,
edit
.
newUri
,
overwrite
);
await
this
.
_textFileService
.
move
(
edit
.
oldUri
,
edit
.
newUri
,
overwrite
);
}
else
if
(
!
edit
.
newUri
&&
edit
.
oldUri
)
{
}
else
if
(
!
edit
.
newUri
&&
edit
.
oldUri
)
{
// let recrusive = edit.options && edit.options.recursive;
await
this
.
_textFileService
.
delete
(
edit
.
oldUri
,
true
);
await
this
.
_textFileService
.
delete
(
edit
.
oldUri
,
true
);
}
else
if
(
edit
.
newUri
&&
!
edit
.
oldUri
)
{
}
else
if
(
edit
.
newUri
&&
!
edit
.
oldUri
)
{
let
ignoreIfExists
=
edit
.
options
&&
edit
.
options
.
ignoreIfExists
;
let
ignoreIfExists
=
edit
.
options
&&
edit
.
options
.
ignoreIfExists
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录