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

Side by Side Diff: runtime/bin/directory_impl.dart

Issue 11090016: Change core lib, dart2js, and more for new optional parameters syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
« no previous file with comments | « runtime/bin/directory.dart ('k') | runtime/bin/file_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 5
6 class _Directory implements Directory { 6 class _Directory implements Directory {
7 static const CREATE_REQUEST = 0; 7 static const CREATE_REQUEST = 0;
8 static const DELETE_REQUEST = 1; 8 static const DELETE_REQUEST = 1;
9 static const EXISTS_REQUEST = 2; 9 static const EXISTS_REQUEST = 2;
10 static const CREATE_TEMP_REQUEST = 3; 10 static const CREATE_TEMP_REQUEST = 3;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 if (_path is !String || newPath is !String) { 162 if (_path is !String || newPath is !String) {
163 throw new ArgumentError(); 163 throw new ArgumentError();
164 } 164 }
165 var result = _rename(_path, newPath); 165 var result = _rename(_path, newPath);
166 if (result is OSError) { 166 if (result is OSError) {
167 throw new DirectoryIOException("Rename failed", _path, result); 167 throw new DirectoryIOException("Rename failed", _path, result);
168 } 168 }
169 return new Directory(newPath); 169 return new Directory(newPath);
170 } 170 }
171 171
172 DirectoryLister list([bool recursive = false]) { 172 DirectoryLister list({bool recursive: false}) {
173 return new _DirectoryLister(_path, recursive); 173 return new _DirectoryLister(_path, recursive);
174 } 174 }
175 175
176 String get path { return _path; } 176 String get path { return _path; }
177 177
178 bool _isErrorResponse(response) { 178 bool _isErrorResponse(response) {
179 return response is List && response[0] != _SUCCESS_RESPONSE; 179 return response is List && response[0] != _SUCCESS_RESPONSE;
180 } 180 }
181 181
182 Exception _exceptionFromResponse(response, String message) { 182 Exception _exceptionFromResponse(response, String message) {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } else { 285 } else {
286 throw e; 286 throw e;
287 } 287 }
288 } 288 }
289 289
290 Function _onDir; 290 Function _onDir;
291 Function _onFile; 291 Function _onFile;
292 Function _onDone; 292 Function _onDone;
293 Function _onError; 293 Function _onError;
294 } 294 }
OLDNEW
« no previous file with comments | « runtime/bin/directory.dart ('k') | runtime/bin/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698