Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
383086bc
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,发现更多精彩内容 >>
提交
383086bc
编写于
11月 09, 2016
作者:
D
Daniel Imms
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove a bunch of unused code in FileService
上级
ba1bca7f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
32 deletion
+8
-32
src/vs/workbench/services/backup/test/backupFileService.test.ts
.../workbench/services/backup/test/backupFileService.test.ts
+1
-1
src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts
...nfiguration/test/node/configurationEditingService.test.ts
+2
-2
src/vs/workbench/services/files/electron-browser/fileService.ts
.../workbench/services/files/electron-browser/fileService.ts
+1
-1
src/vs/workbench/services/files/node/fileService.ts
src/vs/workbench/services/files/node/fileService.ts
+1
-25
src/vs/workbench/services/files/test/node/fileService.test.ts
...vs/workbench/services/files/test/node/fileService.test.ts
+3
-3
未找到文件。
src/vs/workbench/services/backup/test/backupFileService.test.ts
浏览文件 @
383086bc
...
...
@@ -20,7 +20,7 @@ import { FileService } from 'vs/workbench/services/files/node/fileService';
class
TestBackupFileService
extends
BackupFileService
{
constructor
(
workspace
:
Uri
,
backupHome
:
string
,
workspacesJsonPath
:
string
)
{
const
fileService
=
new
FileService
(
workspace
.
fsPath
,
{
disableWatcher
:
true
},
null
,
null
,
null
);
const
fileService
=
new
FileService
(
workspace
.
fsPath
,
{
disableWatcher
:
true
},
null
);
super
(
workspace
,
TestEnvironmentService
,
fileService
);
this
.
backupHome
=
backupHome
;
...
...
src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts
浏览文件 @
383086bc
...
...
@@ -96,7 +96,7 @@ suite('WorkspaceConfigurationEditingService - Node', () => {
const
configurationService
=
new
WorkspaceConfigurationService
(
workspaceContextService
,
new
TestEventService
(),
environmentService
);
const
textFileService
=
workbenchInstantiationService
().
createInstance
(
TestDirtyTextFileService
,
dirty
);
const
events
=
new
utils
.
TestEventService
();
const
fileService
=
new
FileService
(
noWorkspace
?
null
:
workspaceDir
,
{
disableWatcher
:
true
},
events
,
environmentService
,
configurationService
);
const
fileService
=
new
FileService
(
noWorkspace
?
null
:
workspaceDir
,
{
disableWatcher
:
true
},
events
);
return
configurationService
.
initialize
().
then
(()
=>
{
return
{
...
...
@@ -359,7 +359,7 @@ suite('WorkspaceConfigurationEditingService - Node', () => {
if
(
error
)
{
return
cleanUp
(
done
,
error
);
}
createServices
(
workspaceDir
,
globalSettingsFile
).
done
(
services
=>
{
const
target
=
path
.
join
(
workspaceDir
,
WORKSPACE_STANDALONE_CONFIGURATIONS
[
'
launch
'
]);
...
...
src/vs/workbench/services/files/electron-browser/fileService.ts
浏览文件 @
383086bc
...
...
@@ -81,7 +81,7 @@ export class FileService implements IFileService {
// create service
const
workspace
=
this
.
contextService
.
getWorkspace
();
this
.
raw
=
new
NodeFileService
(
workspace
?
workspace
.
resource
.
fsPath
:
void
0
,
fileServiceConfig
,
this
.
eventService
,
this
.
environmentService
,
this
.
configurationService
);
this
.
raw
=
new
NodeFileService
(
workspace
?
workspace
.
resource
.
fsPath
:
void
0
,
fileServiceConfig
,
this
.
eventService
);
// Listeners
this
.
registerListeners
();
...
...
src/vs/workbench/services/files/node/fileService.ts
浏览文件 @
383086bc
...
...
@@ -28,14 +28,10 @@ import pfs = require('vs/base/node/pfs');
import
encoding
=
require
(
'
vs/base/node/encoding
'
);
import
mime
=
require
(
'
vs/base/node/mime
'
);
import
flow
=
require
(
'
vs/base/node/flow
'
);
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
FileWatcher
as
UnixWatcherService
}
from
'
vs/workbench/services/files/node/watcher/unix/watcherService
'
;
import
{
FileWatcher
as
WindowsWatcherService
}
from
'
vs/workbench/services/files/node/watcher/win32/watcherService
'
;
import
{
toFileChangesEvent
,
normalize
,
IRawFileChange
}
from
'
vs/workbench/services/files/node/watcher/common
'
;
import
{
IEventService
}
from
'
vs/platform/event/common/event
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IFilesConfiguration
}
from
'
vs/platform/files/common/files
'
;
export
interface
IEncodingOverride
{
resource
:
uri
;
...
...
@@ -76,7 +72,6 @@ export class FileService implements IFileService {
private
static
FS_EVENT_DELAY
=
50
;
// aggregate and only emit events when changes have stopped for this duration (in ms)
private
static
MAX_DEGREE_OF_PARALLEL_FS_OPS
=
10
;
// degree of parallel fs calls that we accept at the same time
private
toUnbind
:
IDisposable
[];
private
basePath
:
string
;
private
tmpPath
:
string
;
private
options
:
IFileServiceOptions
;
...
...
@@ -87,14 +82,10 @@ export class FileService implements IFileService {
private
fileChangesWatchDelayer
:
ThrottledDelayer
<
void
>
;
private
undeliveredRawFileChangesEvents
:
IRawFileChange
[];
private
configuredHotExit
:
boolean
;
constructor
(
basePath
:
string
,
options
:
IFileServiceOptions
,
private
eventEmitter
:
IEventService
,
private
environmentService
:
IEnvironmentService
,
private
configurationService
:
IConfigurationService
private
eventEmitter
:
IEventService
)
{
this
.
basePath
=
basePath
?
paths
.
normalize
(
basePath
)
:
void
0
;
...
...
@@ -128,19 +119,6 @@ export class FileService implements IFileService {
this
.
activeFileChangesWatchers
=
Object
.
create
(
null
);
this
.
fileChangesWatchDelayer
=
new
ThrottledDelayer
<
void
>
(
FileService
.
FS_EVENT_DELAY
);
this
.
undeliveredRawFileChangesEvents
=
[];
// Configuration changes
this
.
toUnbind
=
[];
if
(
this
.
configurationService
)
{
this
.
toUnbind
.
push
(
this
.
configurationService
.
onDidUpdateConfiguration
(
e
=>
this
.
onConfigurationChange
(
e
.
config
)));
const
configuration
=
this
.
configurationService
.
getConfiguration
<
IFilesConfiguration
>
();
this
.
onConfigurationChange
(
configuration
);
}
}
private
onConfigurationChange
(
configuration
:
IFilesConfiguration
):
void
{
this
.
configuredHotExit
=
configuration
&&
configuration
.
files
&&
configuration
.
files
.
hotExit
;
}
public
updateOptions
(
options
:
IFileServiceOptions
):
void
{
...
...
@@ -688,8 +666,6 @@ export class FileService implements IFileService {
watcher
.
close
();
}
this
.
activeFileChangesWatchers
=
Object
.
create
(
null
);
this
.
toUnbind
=
dispose
(
this
.
toUnbind
);
}
}
...
...
src/vs/workbench/services/files/test/node/fileService.test.ts
浏览文件 @
383086bc
...
...
@@ -38,7 +38,7 @@ suite('FileService', () => {
}
events
=
new
utils
.
TestEventService
();
service
=
new
FileService
(
testDir
,
{
disableWatcher
:
true
},
events
,
null
,
null
);
service
=
new
FileService
(
testDir
,
{
disableWatcher
:
true
},
events
);
done
();
});
});
...
...
@@ -499,7 +499,7 @@ suite('FileService', () => {
encoding
:
'
windows1252
'
,
encodingOverride
:
encodingOverride
,
disableWatcher
:
true
},
null
,
null
,
null
);
},
null
);
_service
.
resolveContent
(
uri
.
file
(
path
.
join
(
testDir
,
'
index.html
'
))).
done
(
c
=>
{
assert
.
equal
(
c
.
encoding
,
'
windows1252
'
);
...
...
@@ -525,7 +525,7 @@ suite('FileService', () => {
let
_service
=
new
FileService
(
_testDir
,
{
disableWatcher
:
true
},
null
,
null
,
null
);
},
null
);
extfs
.
copy
(
_sourceDir
,
_testDir
,
()
=>
{
fs
.
readFile
(
resource
.
fsPath
,
(
error
,
data
)
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录