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

Side by Side Diff: pkg/analysis_server/lib/src/source/caching_pub_package_map_provider.dart

Issue 2894883002: Remove more libraries directives from server (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library source.caching_pub_package_map_provider;
6
7 import 'dart:convert'; 5 import 'dart:convert';
8 import 'dart:core'; 6 import 'dart:core';
9 import 'dart:io' as io; 7 import 'dart:io' as io;
10 8
11 import 'package:analyzer/file_system/file_system.dart'; 9 import 'package:analyzer/file_system/file_system.dart';
12 import 'package:analyzer/source/package_map_provider.dart'; 10 import 'package:analyzer/source/package_map_provider.dart';
13 import 'package:analyzer/source/pub_package_map_provider.dart'; 11 import 'package:analyzer/source/pub_package_map_provider.dart';
14 import 'package:analyzer/src/dart/sdk/sdk.dart'; 12 import 'package:analyzer/src/dart/sdk/sdk.dart';
15 import 'package:analyzer/src/generated/engine.dart'; 13 import 'package:analyzer/src/generated/engine.dart';
16 import 'package:analyzer/src/generated/source.dart'; 14 import 'package:analyzer/src/generated/source.dart';
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // TODO(danrubel) This implementation assumes that 249 // TODO(danrubel) This implementation assumes that
252 // two separate processes are not accessing the cache file at the same time 250 // two separate processes are not accessing the cache file at the same time
253 io.File file = new io.File(cacheFile.path); 251 io.File file = new io.File(cacheFile.path);
254 if (!file.parent.existsSync()) { 252 if (!file.parent.existsSync()) {
255 file.parent.createSync(recursive: true); 253 file.parent.createSync(recursive: true);
256 } 254 }
257 file.writeAsStringSync(content, flush: true); 255 file.writeAsStringSync(content, flush: true);
258 return file.lastModifiedSync().millisecondsSinceEpoch; 256 return file.lastModifiedSync().millisecondsSinceEpoch;
259 } 257 }
260 } 258 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/socket_server.dart ('k') | pkg/analysis_server/lib/src/status/ast_writer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698