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