Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(929)

Unified Diff: pkg/analysis_server/lib/src/socket_server.dart

Issue 426773002: Issue 20240. Use a FileManager that manages its own temporary directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/socket_server.dart
diff --git a/pkg/analysis_server/lib/src/socket_server.dart b/pkg/analysis_server/lib/src/socket_server.dart
index 16fd27bf803633022e77a1dd2bb3bf4efb39279d..3be880a32a383677b924722460c2a28dbeac1049 100644
--- a/pkg/analysis_server/lib/src/socket_server.dart
+++ b/pkg/analysis_server/lib/src/socket_server.dart
@@ -4,8 +4,6 @@
library socket.server;
-import 'dart:io' as io;
-
import 'package:analysis_server/src/analysis_server.dart';
import 'package:analysis_server/src/channel.dart';
import 'package:analysis_server/src/domain_analysis.dart';
@@ -17,7 +15,6 @@ import 'package:analysis_server/src/package_map_provider.dart';
import 'package:analysis_server/src/protocol.dart';
import 'package:analyzer/file_system/physical_file_system.dart';
import 'package:analyzer/src/generated/sdk_io.dart';
-import 'package:path/path.dart' as pathos;
import 'package:analysis_services/index/index.dart';
import 'package:analysis_services/index/local_file_index.dart';
@@ -26,16 +23,7 @@ import 'package:analysis_services/index/local_file_index.dart';
* Creates and runs an [Index].
*/
Index _createIndex() {
- String tempPath = io.Directory.systemTemp.path;
- String indexPath = pathos.join(tempPath, 'AnalysisServer_index');
- io.Directory indexDirectory = new io.Directory(indexPath);
- if (indexDirectory.existsSync()) {
- indexDirectory.deleteSync(recursive: true);
- }
- if (!indexDirectory.existsSync()) {
- indexDirectory.createSync();
- }
- Index index = createLocalFileIndex(indexDirectory);
+ Index index = createLocalFileIndex();
index.run();
return index;
}

Powered by Google App Engine
This is Rietveld 408576698