|
5 | 5 | /// <reference path="../compiler/commandLineParser.ts"/> |
6 | 6 | namespace vfs { |
7 | 7 | import compareStrings = collections.compareStrings; |
8 | | - import SortedCollection = collections.SortedCollection; |
| 8 | + import KeyedCollection = collections.KeyedCollection; |
9 | 9 | import Metadata = collections.Metadata; |
10 | 10 | import EventEmitter = events.EventEmitter; |
11 | 11 | import IO = Harness.IO; |
@@ -123,8 +123,8 @@ namespace vfs { |
123 | 123 | private _currentDirectory: string; |
124 | 124 | private _currentDirectoryStack: string[] | undefined; |
125 | 125 | private _shadowRoot: VirtualFileSystem | undefined; |
126 | | - private _watchedFiles: SortedCollection<string, FileWatcherEntry[]> | undefined; |
127 | | - private _watchedDirectories: SortedCollection<string, DirectoryWatcherEntryArray> | undefined; |
| 126 | + private _watchedFiles: KeyedCollection<string, FileWatcherEntry[]> | undefined; |
| 127 | + private _watchedDirectories: KeyedCollection<string, DirectoryWatcherEntryArray> | undefined; |
128 | 128 | private _onRootFileSystemChange: (path: string, change: FileSystemChange) => void; |
129 | 129 |
|
130 | 130 | constructor(currentDirectory: string, useCaseSensitiveFileNames: boolean) { |
@@ -410,7 +410,7 @@ namespace vfs { |
410 | 410 | public watchFile(path: string, watcher: (path: string, change: FileSystemChange) => void): ts.FileWatcher { |
411 | 411 | if (!this._watchedFiles) { |
412 | 412 | const pathComparer = this.useCaseSensitiveFileNames ? vpath.compare.caseSensitive : vpath.compare.caseInsensitive; |
413 | | - this._watchedFiles = new SortedCollection<string, FileWatcherEntry[]>(pathComparer); |
| 413 | + this._watchedFiles = new KeyedCollection<string, FileWatcherEntry[]>(pathComparer); |
414 | 414 | } |
415 | 415 |
|
416 | 416 | path = vpath.resolve(this.currentDirectory, path); |
@@ -439,7 +439,7 @@ namespace vfs { |
439 | 439 | public watchDirectory(path: string, watcher: (path: string) => void, recursive?: boolean) { |
440 | 440 | if (!this._watchedDirectories) { |
441 | 441 | const pathComparer = this.useCaseSensitiveFileNames ? vpath.compare.caseSensitive : vpath.compare.caseInsensitive; |
442 | | - this._watchedDirectories = new SortedCollection<string, DirectoryWatcherEntryArray>(pathComparer); |
| 442 | + this._watchedDirectories = new KeyedCollection<string, DirectoryWatcherEntryArray>(pathComparer); |
443 | 443 | } |
444 | 444 |
|
445 | 445 | path = vpath.resolve(this.currentDirectory, path); |
@@ -641,7 +641,7 @@ namespace vfs { |
641 | 641 | export class VirtualDirectory extends VirtualFileSystemEntry { |
642 | 642 | protected _shadowRoot: VirtualDirectory | undefined; |
643 | 643 | private _parent: VirtualDirectory; |
644 | | - private _entries: SortedCollection<string, VirtualEntry> | undefined; |
| 644 | + private _entries: KeyedCollection<string, VirtualEntry> | undefined; |
645 | 645 | private _resolver: FileSystemResolver | undefined; |
646 | 646 | private _onChildFileSystemChange: (path: string, change: FileSystemChange) => void; |
647 | 647 |
|
@@ -907,7 +907,7 @@ namespace vfs { |
907 | 907 |
|
908 | 908 | protected getOwnEntries() { |
909 | 909 | if (!this._entries) { |
910 | | - const entries = new SortedCollection<string, VirtualEntry>(this.fileSystem.stringComparer); |
| 910 | + const entries = new KeyedCollection<string, VirtualEntry>(this.fileSystem.stringComparer); |
911 | 911 | const resolver = this._resolver; |
912 | 912 | const shadowRoot = this._shadowRoot; |
913 | 913 | if (resolver) { |
@@ -1053,16 +1053,16 @@ namespace vfs { |
1053 | 1053 | export class VirtualDirectorySymlink extends VirtualDirectory { |
1054 | 1054 | private _targetPath: string; |
1055 | 1055 | private _target: VirtualDirectory | undefined; |
1056 | | - private _views: SortedCollection<string, VirtualEntryView> | undefined; |
1057 | | - private _allViews: SortedCollection<string, VirtualEntryView> | undefined; |
| 1056 | + private _views: KeyedCollection<string, VirtualEntryView> | undefined; |
| 1057 | + private _allViews: KeyedCollection<string, VirtualEntryView> | undefined; |
1058 | 1058 | private _onTargetParentChildRemoved: (entry: VirtualEntry) => void; |
1059 | 1059 | private _onTargetChildRemoved: (entry: VirtualEntry) => void; |
1060 | 1060 | private _onTargetChildAdded: (entry: VirtualEntry) => void; |
1061 | 1061 | private _onTargetFileSystemChange: (path: string, change: FileSystemChange) => void; |
1062 | 1062 |
|
1063 | 1063 | constructor(parent: VirtualDirectory, name: string, target: string) { |
1064 | 1064 | super(parent, name); |
1065 | | - this._views = new SortedCollection<string, VirtualEntryView>(this.fileSystem.stringComparer); |
| 1065 | + this._views = new KeyedCollection<string, VirtualEntryView>(this.fileSystem.stringComparer); |
1066 | 1066 | this._targetPath = target; |
1067 | 1067 | this._onTargetParentChildRemoved = entry => this.onTargetParentChildRemoved(entry); |
1068 | 1068 | this._onTargetChildAdded = entry => this.onTargetChildAdded(entry); |
@@ -1142,9 +1142,9 @@ namespace vfs { |
1142 | 1142 | return target && target.removeFile(name) || false; |
1143 | 1143 | } |
1144 | 1144 |
|
1145 | | - protected getOwnEntries(): SortedCollection<string, VirtualEntryView> { |
| 1145 | + protected getOwnEntries(): KeyedCollection<string, VirtualEntryView> { |
1146 | 1146 | if (!this._allViews) { |
1147 | | - this._allViews = new SortedCollection<string, VirtualEntryView>(this.fileSystem.stringComparer); |
| 1147 | + this._allViews = new KeyedCollection<string, VirtualEntryView>(this.fileSystem.stringComparer); |
1148 | 1148 | const target = this.target; |
1149 | 1149 | if (target) { |
1150 | 1150 | for (const entry of target.getEntries()) { |
|
0 commit comments