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

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

Issue 25553002: Fix breakage from r28097 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix break in docgen test. Created 7 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_macos.cc ('k') | no next file » | 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 extends FileSystemEntity implements Directory { 7 class _Directory extends FileSystemEntity implements Directory {
8 final String path; 8 final String path;
9 9
10 _Directory(String this.path) { 10 _Directory(String this.path) {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 fullTemplate, 185 fullTemplate,
186 result); 186 result);
187 } 187 }
188 return new Directory(result); 188 return new Directory(result);
189 } 189 }
190 190
191 static Future<Directory> createSystemTemp(String template) { 191 static Future<Directory> createSystemTemp(String template) {
192 return _IOService.dispatch(_DIRECTORY_CREATE_SYSTEM_TEMP, 192 return _IOService.dispatch(_DIRECTORY_CREATE_SYSTEM_TEMP,
193 [template]).then((response) { 193 [template]).then((response) {
194 if (response is List && response[0] != _SUCCESS_RESPONSE) { 194 if (response is List && response[0] != _SUCCESS_RESPONSE) {
195 throw new Directory(template)._exceptionOrErrorFromResponse( 195 throw new _Directory(template)._exceptionOrErrorFromResponse(
196 response, "Creation of temporary directory failed"); 196 response, "Creation of temporary directory failed");
197 } 197 }
198 return new Directory(response); 198 return new Directory(response);
199 }); 199 });
200 } 200 }
201 201
202 static Directory createSystemTempSync(String template) { 202 static Directory createSystemTempSync(String template) {
203 var result = _createTemp(template, true); 203 var result = _createTemp(template, true);
204 if (result is OSError) { 204 if (result is OSError) {
205 throw new DirectoryException("Creation of temporary directory failed", 205 throw new DirectoryException("Creation of temporary directory failed",
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 controller.addError( 408 controller.addError(
409 new DirectoryException("Directory listing failed", 409 new DirectoryException("Directory listing failed",
410 errorPath, 410 errorPath,
411 err)); 411 err));
412 } else { 412 } else {
413 controller.addError( 413 controller.addError(
414 new DirectoryException("Internal error")); 414 new DirectoryException("Internal error"));
415 } 415 }
416 } 416 }
417 } 417 }
OLDNEW
« no previous file with comments | « runtime/bin/directory_macos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698