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

Side by Side Diff: sdk/lib/io/directory_impl.dart

Issue 17265003: Avoid double-// on directory listing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | « no previous file | tests/standalone/io/directory_list_pause_test.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 part of dart.io; 5 part of dart.io;
6 6
7 class _Directory implements Directory { 7 class _Directory implements Directory {
8 static const CREATE_REQUEST = 0; 8 static const CREATE_REQUEST = 0;
9 static const DELETE_REQUEST = 1; 9 static const DELETE_REQUEST = 1;
10 static const EXISTS_REQUEST = 2; 10 static const EXISTS_REQUEST = 2;
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 int id; 320 int id;
321 bool canceled = false; 321 bool canceled = false;
322 bool nextRunning = false; 322 bool nextRunning = false;
323 bool closed = false; 323 bool closed = false;
324 324
325 _AsyncDirectoryLister(String this.path, 325 _AsyncDirectoryLister(String this.path,
326 bool this.recursive, 326 bool this.recursive,
327 bool this.followLinks) { 327 bool this.followLinks) {
328 controller = new StreamController(onListen: onListen, 328 controller = new StreamController(onListen: onListen,
329 onResume: onResume, 329 onResume: onResume,
330 onCancel: onCancel); 330 onCancel: onCancel,
331 sync: true);
331 } 332 }
332 333
333 Stream get stream => controller.stream; 334 Stream get stream => controller.stream;
334 335
335 void onListen() { 336 void onListen() {
336 var request = [_Directory.LIST_START_REQUEST, path, recursive, followLinks]; 337 var request = [_Directory.LIST_START_REQUEST, path, recursive, followLinks];
337 _Directory._newServicePort().call(request) 338 _Directory._newServicePort().call(request)
338 .then((response) { 339 .then((response) {
339 if (response is int) { 340 if (response is int) {
340 id = response; 341 id = response;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 controller.addError( 425 controller.addError(
425 new DirectoryException("Directory listing failed", 426 new DirectoryException("Directory listing failed",
426 errorPath, 427 errorPath,
427 err)); 428 err));
428 } else { 429 } else {
429 controller.addError( 430 controller.addError(
430 new DirectoryException("Internal error")); 431 new DirectoryException("Internal error"));
431 } 432 }
432 } 433 }
433 } 434 }
OLDNEW
« no previous file with comments | « no previous file | tests/standalone/io/directory_list_pause_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698