| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 builtin; | 5 library builtin; |
| 6 import 'dart:io'; | 6 import 'dart:io'; |
| 7 | 7 |
| 8 // Corelib 'print' implementation. | 8 // Corelib 'print' implementation. |
| 9 void _print(arg) { | 9 void _print(arg) { |
| 10 _Logger._printString(arg.toString()); | 10 _Logger._printString(arg.toString()); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 // Only handling file and package URIs in standalone binary. | 229 // Only handling file and package URIs in standalone binary. |
| 230 _logResolution('# Unknown scheme (${uri.scheme}) in $uri.'); | 230 _logResolution('# Unknown scheme (${uri.scheme}) in $uri.'); |
| 231 throw 'Not a known scheme: $uri'; | 231 throw 'Not a known scheme: $uri'; |
| 232 } | 232 } |
| 233 | 233 |
| 234 if (_isWindows && path.startsWith('/')) { | 234 if (_isWindows && path.startsWith('/')) { |
| 235 // For Windows we need to massage the paths a bit according to | 235 // For Windows we need to massage the paths a bit according to |
| 236 // http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx | 236 // http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx |
| 237 // | 237 // |
| 238 // Drop the leading / before the drive letter. | 238 // Drop the leading / before the drive letter. |
| 239 // TODO(14577): Handle paths like \\server\share\dir\file. |
| 239 path = path.substring(1); | 240 path = path.substring(1); |
| 240 _logResolution('# Path: Removed leading / -> $path'); | 241 _logResolution('# Path: Removed leading / -> $path'); |
| 241 } | 242 } |
| 242 | 243 |
| 243 return path; | 244 return path; |
| 244 } | 245 } |
| 245 | 246 |
| 246 | 247 |
| 247 String _filePathFromFileUri(Uri uri) { | 248 String _filePathFromFileUri(Uri uri) { |
| 248 if (!uri.host.isEmpty) { | 249 if (!uri.host.isEmpty) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 304 } |
| 304 _logResolution('# Package: $uri -> $path'); | 305 _logResolution('# Package: $uri -> $path'); |
| 305 return path; | 306 return path; |
| 306 } | 307 } |
| 307 | 308 |
| 308 | 309 |
| 309 String _filePathFromHttpUri(Uri uri) { | 310 String _filePathFromHttpUri(Uri uri) { |
| 310 _logResolution('# Path: $uri -> $uri'); | 311 _logResolution('# Path: $uri -> $uri'); |
| 311 return uri.toString(); | 312 return uri.toString(); |
| 312 } | 313 } |
| OLD | NEW |