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 filenames; | 5 library filenames; |
6 | 6 |
7 import 'dart:io' show Platform; | 7 import 'dart:io' show Platform; |
8 | 8 |
9 // For information about how to convert Windows file names to URIs: | 9 // For information about how to convert Windows file names to URIs: |
10 // http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx | 10 // http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx |
(...skipping 14 matching lines...) Expand all Loading... |
25 if (path.length > 3 && path[0] == '/' && path[2] == ':') { | 25 if (path.length > 3 && path[0] == '/' && path[2] == ':') { |
26 return path.substring(1).replaceAll('/', '\\'); | 26 return path.substring(1).replaceAll('/', '\\'); |
27 } else { | 27 } else { |
28 return path.replaceAll('/', '\\'); | 28 return path.replaceAll('/', '\\'); |
29 } | 29 } |
30 } | 30 } |
31 | 31 |
32 final Uri currentDirectory = Uri.base; | 32 final Uri currentDirectory = Uri.base; |
33 | 33 |
34 String appendSlash(String path) => path.endsWith('/') ? path : '$path/'; | 34 String appendSlash(String path) => path.endsWith('/') ? path : '$path/'; |
OLD | NEW |