Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
35068aec
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
35068aec
编写于
3月 19, 2019
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove IFileService.readFolder (fixes #69330)
上级
e54f3d7e
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
6 addition
and
37 deletion
+6
-37
src/vs/platform/files/common/files.ts
src/vs/platform/files/common/files.ts
+0
-8
src/vs/workbench/browser/nodeless.simpleservices.ts
src/vs/workbench/browser/nodeless.simpleservices.ts
+0
-2
src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts
src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts
+4
-2
src/vs/workbench/services/dialogs/browser/remoteFileDialog.ts
...vs/workbench/services/dialogs/browser/remoteFileDialog.ts
+2
-1
src/vs/workbench/services/files/node/fileService.ts
src/vs/workbench/services/files/node/fileService.ts
+0
-6
src/vs/workbench/services/files/node/remoteFileService.ts
src/vs/workbench/services/files/node/remoteFileService.ts
+0
-10
src/vs/workbench/services/files2/common/fileService2.ts
src/vs/workbench/services/files2/common/fileService2.ts
+0
-4
src/vs/workbench/test/workbenchTestServices.ts
src/vs/workbench/test/workbenchTestServices.ts
+0
-4
未找到文件。
src/vs/platform/files/common/files.ts
浏览文件 @
35068aec
...
...
@@ -139,12 +139,6 @@ export interface IFileService {
*/
createFile
(
resource
:
URI
,
content
?:
string
,
options
?:
ICreateFileOptions
):
Promise
<
IFileStat
>
;
/**
* Reads a folder's content with the given path. The returned promise
* will have the list of children as a result.
*/
readFolder
(
resource
:
URI
):
Promise
<
string
[]
>
;
/**
* Creates a new folder with the given path. The returned promise
* will have the stat model object as a result.
...
...
@@ -1058,8 +1052,6 @@ export interface ILegacyFileService {
createFile
(
resource
:
URI
,
content
?:
string
,
options
?:
ICreateFileOptions
):
Promise
<
IFileStat
>
;
readFolder
(
resource
:
URI
):
Promise
<
string
[]
>
;
del
(
resource
:
URI
,
options
?:
{
useTrash
?:
boolean
,
recursive
?:
boolean
}):
Promise
<
void
>
;
watchFileChanges
(
resource
:
URI
):
void
;
...
...
src/vs/workbench/browser/nodeless.simpleservices.ts
浏览文件 @
35068aec
...
...
@@ -783,8 +783,6 @@ export class SimpleRemoteFileService implements IFileService {
return
Promise
.
resolve
(
createFile
(
parent
,
basename
(
_resource
.
path
)));
}
readFolder
(
_resource
:
URI
)
{
return
Promise
.
resolve
([]);
}
createFolder
(
_resource
:
URI
):
Promise
<
IFileStat
>
{
const
parent
=
fileMap
.
get
(
dirname
(
_resource
));
if
(
!
parent
)
{
...
...
src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts
浏览文件 @
35068aec
...
...
@@ -68,8 +68,10 @@ export class WelcomePageContribution implements IWorkbenchContribution {
if
(
openWithReadme
)
{
return
Promise
.
all
(
contextService
.
getWorkspace
().
folders
.
map
(
folder
=>
{
const
folderUri
=
folder
.
uri
;
return
fileService
.
readFolder
(
folderUri
)
.
then
(
files
=>
{
return
fileService
.
resolveFile
(
folderUri
)
.
then
(
folder
=>
{
const
files
=
folder
.
children
?
folder
.
children
.
map
(
child
=>
child
.
name
)
:
[];
const
file
=
arrays
.
find
(
files
.
sort
(),
file
=>
strings
.
startsWith
(
file
.
toLowerCase
(),
'
readme
'
));
if
(
file
)
{
return
joinPath
(
folderUri
,
file
);
...
...
src/vs/workbench/services/dialogs/browser/remoteFileDialog.ts
浏览文件 @
35068aec
...
...
@@ -494,7 +494,8 @@ export class RemoteFileDialog {
const
backDir
=
this
.
createBackItem
(
currentFolder
);
try
{
const
fileNames
=
await
this
.
fileService
.
readFolder
(
currentFolder
);
const
folder
=
await
this
.
fileService
.
resolveFile
(
currentFolder
);
const
fileNames
=
folder
.
children
?
folder
.
children
.
map
(
child
=>
child
.
name
)
:
[];
const
items
=
await
Promise
.
all
(
fileNames
.
map
(
fileName
=>
this
.
createItem
(
fileName
,
currentFolder
)));
for
(
let
item
of
items
)
{
if
(
item
)
{
...
...
src/vs/workbench/services/files/node/fileService.ts
浏览文件 @
35068aec
...
...
@@ -756,12 +756,6 @@ export class FileService extends Disposable implements ILegacyFileService {
});
}
readFolder
(
resource
:
uri
):
Promise
<
string
[]
>
{
const
absolutePath
=
this
.
toAbsolutePath
(
resource
);
return
pfs
.
readdir
(
absolutePath
);
}
private
checkFileBeforeWriting
(
absolutePath
:
string
,
options
:
IUpdateContentOptions
=
Object
.
create
(
null
),
ignoreReadonly
?:
boolean
):
Promise
<
boolean
/* exists */
>
{
return
pfs
.
exists
(
absolutePath
).
then
(
exists
=>
{
if
(
exists
)
{
...
...
src/vs/workbench/services/files/node/remoteFileService.ts
浏览文件 @
35068aec
...
...
@@ -473,16 +473,6 @@ export class RemoteFileService extends FileService {
}
}
readFolder
(
resource
:
URI
):
Promise
<
string
[]
>
{
if
(
resource
.
scheme
===
Schemas
.
file
)
{
return
super
.
readFolder
(
resource
);
}
else
{
return
this
.
_withProvider
(
resource
).
then
(
provider
=>
{
return
provider
.
readdir
(
resource
);
}).
then
(
list
=>
list
.
map
(
l
=>
l
[
0
]));
}
}
moveFile
(
source
:
URI
,
target
:
URI
,
overwrite
?:
boolean
):
Promise
<
IFileStat
>
{
if
(
source
.
scheme
!==
target
.
scheme
)
{
return
this
.
_doMoveAcrossScheme
(
source
,
target
);
...
...
src/vs/workbench/services/files2/common/fileService2.ts
浏览文件 @
35068aec
...
...
@@ -129,10 +129,6 @@ export class FileService2 extends Disposable implements IFileService {
//#region File Metadata Resolving
readFolder
(
resource
:
URI
):
Promise
<
string
[]
>
{
return
this
.
_impl
.
readFolder
(
resource
);
}
resolveFile
(
resource
:
URI
,
options
?:
IResolveFileOptions
):
Promise
<
IFileStat
>
{
return
this
.
_impl
.
resolveFile
(
resource
,
options
);
}
...
...
src/vs/workbench/test/workbenchTestServices.ts
浏览文件 @
35068aec
...
...
@@ -1005,10 +1005,6 @@ export class TestFileService implements IFileService {
throw
new
Error
(
'
not implemented
'
);
}
readFolder
(
_resource
:
URI
)
{
return
Promise
.
resolve
([]);
}
createFolder
(
_resource
:
URI
):
Promise
<
IFileStat
>
{
throw
new
Error
(
'
not implemented
'
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录