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

Side by Side Diff: pkg/analyzer/lib/src/generated/java_io.dart

Issue 229653004: New analyzer snapshot with MapIterator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library java.io; 1 library java.io;
2 2
3 import "dart:io"; 3 import "dart:io";
4 import 'java_core.dart' show JavaIOException, CharSequence; 4 import 'java_core.dart' show JavaIOException, CharSequence;
5 import 'package:path/path.dart' as pathos; 5 import 'package:path/path.dart' as pathos;
6 6
7 class JavaSystemIO { 7 class JavaSystemIO {
8 static Map<String, String> _properties = new Map(); 8 static Map<String, String> _properties = new Map();
9 static String getProperty(String name) { 9 static String getProperty(String name) {
10 { 10 {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 JavaFile getCanonicalFile() => new JavaFile(getCanonicalPath()); 96 JavaFile getCanonicalFile() => new JavaFile(getCanonicalPath());
97 bool exists() { 97 bool exists() {
98 if (_newFile().existsSync()) { 98 if (_newFile().existsSync()) {
99 return true; 99 return true;
100 } 100 }
101 if (_newDirectory().existsSync()) { 101 if (_newDirectory().existsSync()) {
102 return true; 102 return true;
103 } 103 }
104 return false; 104 return false;
105 } 105 }
106 bool isExecutable() {
107 return _newFile().statSync().mode & 0x111 != 0;
108 }
106 bool isFile() { 109 bool isFile() {
107 return _newFile().existsSync(); 110 return _newFile().existsSync();
108 } 111 }
109 bool isDirectory() { 112 bool isDirectory() {
110 return _newDirectory().existsSync(); 113 return _newDirectory().existsSync();
111 } 114 }
112 Uri toURI() => pathos.toUri(_path); 115 Uri toURI() => pathos.toUri(_path);
113 String readAsStringSync() => _newFile().readAsStringSync(); 116 String readAsStringSync() => _newFile().readAsStringSync();
114 int lastModified() { 117 int lastModified() {
115 if (!_newFile().existsSync()) return 0; 118 if (!_newFile().existsSync()) return 0;
116 return _newFile().lastModifiedSync().millisecondsSinceEpoch; 119 return _newFile().lastModifiedSync().millisecondsSinceEpoch;
117 120
118 } 121 }
119 List<JavaFile> listFiles() { 122 List<JavaFile> listFiles() {
120 var files = <JavaFile>[]; 123 var files = <JavaFile>[];
121 var entities = _newDirectory().listSync(); 124 var entities = _newDirectory().listSync();
122 for (FileSystemEntity entity in entities) { 125 for (FileSystemEntity entity in entities) {
123 files.add(new JavaFile(entity.path)); 126 files.add(new JavaFile(entity.path));
124 } 127 }
125 return files; 128 return files;
126 } 129 }
127 File _newFile() => new File(_path); 130 File _newFile() => new File(_path);
128 Directory _newDirectory() => new Directory(_path); 131 Directory _newDirectory() => new Directory(_path);
129 } 132 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/java_engine.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698