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

Side by Side Diff: pkg/analyzer/lib/file_system/memory_file_system.dart

Issue 2392793003: Fix some failures on the windows bots (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/hint_code_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.file_system.memory_file_system; 5 library analyzer.file_system.memory_file_system;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:core'; 10 import 'dart:core';
(...skipping 26 matching lines...) Expand all
37 MemoryResourceProvider( 37 MemoryResourceProvider(
38 {pathos.Context context, @deprecated bool isWindows: false}) 38 {pathos.Context context, @deprecated bool isWindows: false})
39 : _pathContext = context ?? pathos.context, 39 : _pathContext = context ?? pathos.context,
40 absolutePathContext = new AbsolutePathContext( 40 absolutePathContext = new AbsolutePathContext(
41 pathos.Style.platform == pathos.Style.windows); 41 pathos.Style.platform == pathos.Style.windows);
42 42
43 @override 43 @override
44 pathos.Context get pathContext => _pathContext; 44 pathos.Context get pathContext => _pathContext;
45 45
46 /** 46 /**
47 * Convert the given posix [path] to conform to this provider's path context.
48 *
49 * This is a utility method for testing; paths passed in to other methods in
50 * this class are never converted automatically.
51 */
52 String convertPath(String path) {
53 if (pathContext == pathos.windows &&
54 path.startsWith(pathos.posix.separator)) {
55 path = r'C:' +
56 path.replaceAll(pathos.posix.separator, pathos.windows.separator);
57 }
58 return path;
59 }
60
61 /**
47 * Delete the file with the given path. 62 * Delete the file with the given path.
48 */ 63 */
49 void deleteFile(String path) { 64 void deleteFile(String path) {
50 _checkFileAtPath(path); 65 _checkFileAtPath(path);
51 _pathToResource.remove(path); 66 _pathToResource.remove(path);
52 _pathToBytes.remove(path); 67 _pathToBytes.remove(path);
53 _pathToTimestamp.remove(path); 68 _pathToTimestamp.remove(path);
54 _notifyWatchers(path, ChangeType.REMOVE); 69 _notifyWatchers(path, ChangeType.REMOVE);
55 } 70 }
56 71
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 bool operator ==(other) { 564 bool operator ==(other) {
550 if (runtimeType != other.runtimeType) { 565 if (runtimeType != other.runtimeType) {
551 return false; 566 return false;
552 } 567 }
553 return path == other.path; 568 return path == other.path;
554 } 569 }
555 570
556 @override 571 @override
557 String toString() => path; 572 String toString() => path;
558 } 573 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/hint_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698