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

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

Issue 124753002: Code cleanup (mostly io lib and some http lib). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 6 years, 11 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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /** 7 /**
8 * [Link] objects are references to filesystem links. 8 * [Link] objects are references to filesystem links.
9 * 9 *
10 */ 10 */
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 * 136 *
137 * If the link does not exist, or is not a link, throws a FileSystemException. 137 * If the link does not exist, or is not a link, throws a FileSystemException.
138 */ 138 */
139 String targetSync(); 139 String targetSync();
140 } 140 }
141 141
142 142
143 class _Link extends FileSystemEntity implements Link { 143 class _Link extends FileSystemEntity implements Link {
144 final String path; 144 final String path;
145 145
146 _Link(String this.path) { 146 _Link(this.path) {
147 if (path is! String) { 147 if (path is! String) {
148 throw new ArgumentError('${Error.safeToString(path)} ' 148 throw new ArgumentError('${Error.safeToString(path)} '
149 'is not a String'); 149 'is not a String');
150 } 150 }
151 } 151 }
152 152
153 String toString() => "Link: '$path'"; 153 String toString() => "Link: '$path'";
154 154
155 Future<bool> exists() => FileSystemEntity.isLink(path); 155 Future<bool> exists() => FileSystemEntity.isLink(path);
156 156
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 return new ArgumentError(); 292 return new ArgumentError();
293 case _OSERROR_RESPONSE: 293 case _OSERROR_RESPONSE:
294 var err = new OSError(response[_OSERROR_RESPONSE_MESSAGE], 294 var err = new OSError(response[_OSERROR_RESPONSE_MESSAGE],
295 response[_OSERROR_RESPONSE_ERROR_CODE]); 295 response[_OSERROR_RESPONSE_ERROR_CODE]);
296 return new FileSystemException(message, path, err); 296 return new FileSystemException(message, path, err);
297 default: 297 default:
298 return new Exception("Unknown error"); 298 return new Exception("Unknown error");
299 } 299 }
300 } 300 }
301 } 301 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698