Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(928)

Unified Diff: editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart

Issue 131233009: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart
diff --git a/editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart b/editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart
index bdd7fd860b643a99cb844002dc2ec7a4001fe4eb..335f76c9a57138dc211261e7e6437b88ba1c0795 100644
--- a/editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart
+++ b/editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart
@@ -1,7 +1,7 @@
library java.io;
import "dart:io";
-import 'java_core.dart' show JavaIOException;
+import 'java_core.dart' show JavaIOException, CharSequence;
import 'package:path/path.dart' as pathos;
class JavaSystemIO {
@@ -103,11 +103,15 @@ class JavaFile {
}
return false;
}
+ bool isFile() {
+ return _newFile().existsSync();
+ }
bool isDirectory() {
return _newDirectory().existsSync();
}
Uri toURI() => pathos.toUri(_path);
String readAsStringSync() => _newFile().readAsStringSync();
+ CharSequence readAsCharSequenceSync() => CharSequence.wrap(readAsStringSync());
int lastModified() {
if (!_newFile().existsSync()) return 0;
return _newFile().lastModifiedSync().millisecondsSinceEpoch;

Powered by Google App Engine
This is Rietveld 408576698