| OLD | NEW |
| 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 physical_file_system; | 5 library physical_file_system; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:core' hide Resource; | 8 import 'dart:core' hide Resource; |
| 9 import 'dart:io' as io; | 9 import 'dart:io' as io; |
| 10 | 10 |
| 11 import 'package:analyzer/src/generated/java_io.dart'; | 11 import 'package:analyzer/src/generated/java_io.dart'; |
| 12 import 'package:analyzer/src/generated/source_io.dart'; | 12 import 'package:analyzer/src/generated/source_io.dart'; |
| 13 import 'package:path/path.dart'; | 13 import 'package:path/path.dart'; |
| 14 import 'package:watcher/watcher.dart'; | 14 import 'package:watcher/watcher.dart'; |
| 15 | 15 |
| 16 import 'file_system.dart'; | 16 import 'file_system.dart'; |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * A `dart:io` based implementation of [ResourceProvider]. | 19 * A `dart:io` based implementation of [ResourceProvider]. |
| 20 */ | 20 */ |
| 21 class PhysicalResourceProvider implements ResourceProvider { | 21 class PhysicalResourceProvider implements ResourceProvider { |
| 22 static final NORMALIZE_EOL_ALWAYS = | 22 static final NORMALIZE_EOL_ALWAYS = (String string) => |
| 23 (String string) => string.replaceAll(new RegExp('\r\n?'), '\n'); | 23 string.replaceAll(new RegExp('\r\n?'), '\n'); |
| 24 | 24 |
| 25 static final PhysicalResourceProvider INSTANCE = | 25 static final PhysicalResourceProvider INSTANCE = |
| 26 new PhysicalResourceProvider(null); | 26 new PhysicalResourceProvider(null); |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * The name of the directory containing plugin specific subfolders used to | 29 * The name of the directory containing plugin specific subfolders used to |
| 30 * store data across sessions. | 30 * store data across sessions. |
| 31 */ | 31 */ |
| 32 static final String SERVER_DIR = ".dartServer"; | 32 static final String SERVER_DIR = ".dartServer"; |
| 33 | 33 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 bool operator ==(other) { | 213 bool operator ==(other) { |
| 214 if (runtimeType != other.runtimeType) { | 214 if (runtimeType != other.runtimeType) { |
| 215 return false; | 215 return false; |
| 216 } | 216 } |
| 217 return path == other.path; | 217 return path == other.path; |
| 218 } | 218 } |
| 219 | 219 |
| 220 @override | 220 @override |
| 221 String toString() => path; | 221 String toString() => path; |
| 222 } | 222 } |
| OLD | NEW |