| OLD | NEW |
| 1 library java.io; | 1 library java.io; |
| 2 | 2 |
| 3 import "dart:io"; | 3 import "dart:io"; |
| 4 import "dart:uri"; | |
| 5 | 4 |
| 6 class JavaSystemIO { | 5 class JavaSystemIO { |
| 7 static Map<String, String> _properties = new Map(); | 6 static Map<String, String> _properties = new Map(); |
| 8 static String getProperty(String name) { | 7 static String getProperty(String name) { |
| 9 { | 8 { |
| 10 String value = _properties[name]; | 9 String value = _properties[name]; |
| 11 if (value != null) { | 10 if (value != null) { |
| 12 return value; | 11 return value; |
| 13 } | 12 } |
| 14 } | 13 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 return true; | 76 return true; |
| 78 } | 77 } |
| 79 if (_newDirectory().existsSync()) { | 78 if (_newDirectory().existsSync()) { |
| 80 return true; | 79 return true; |
| 81 } | 80 } |
| 82 return false; | 81 return false; |
| 83 } | 82 } |
| 84 bool isDirectory() { | 83 bool isDirectory() { |
| 85 return _newDirectory().existsSync(); | 84 return _newDirectory().existsSync(); |
| 86 } | 85 } |
| 87 Uri toURI() => new Uri.fromComponents(path: _path.toString()); | 86 Uri toURI() => new Uri(path: _path.toString()); |
| 88 String readAsStringSync() => _newFile().readAsStringSync(); | 87 String readAsStringSync() => _newFile().readAsStringSync(); |
| 89 int lastModified() => _newFile().lastModifiedSync().millisecondsSinceEpoch; | 88 int lastModified() => _newFile().lastModifiedSync().millisecondsSinceEpoch; |
| 90 File _newFile() => new File.fromPath(_path); | 89 File _newFile() => new File.fromPath(_path); |
| 91 Directory _newDirectory() => new Directory.fromPath(_path); | 90 Directory _newDirectory() => new Directory.fromPath(_path); |
| 92 } | 91 } |
| OLD | NEW |