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

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

Issue 18496011: Clean up dart:io warnings/errors found by analyzer tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/string_transformer.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) 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 171
172 // Put target into the form "\??\C:\my\target\dir". 172 // Put target into the form "\??\C:\my\target\dir".
173 String _makeWindowsLinkTarget(String target) { 173 String _makeWindowsLinkTarget(String target) {
174 if (target.startsWith('\\??\\')) { 174 if (target.startsWith('\\??\\')) {
175 return target; 175 return target;
176 } 176 }
177 if (!(target.length > 3 && target[1] == ':' && target[2] == '\\')) { 177 if (!(target.length > 3 && target[1] == ':' && target[2] == '\\')) {
178 try { 178 try {
179 target = new File(target).fullPathSync(); 179 target = new File(target).fullPathSync();
180 } catch (e) { 180 } on FileException catch (e) {
181 throw new LinkException('Could not locate target', target, e.osError); 181 throw new LinkException('Could not locate target', target, e.osError);
182 } 182 }
183 } 183 }
184 if (target.length > 3 && target[1] == ':' && target[2] == '\\') { 184 if (target.length > 3 && target[1] == ':' && target[2] == '\\') {
185 target = '\\??\\$target'; 185 target = '\\??\\$target';
186 } else { 186 } else {
187 throw new LinkException( 187 throw new LinkException(
188 'Target $target of Link.create on Windows cannot be converted' + 188 'Target $target of Link.create on Windows cannot be converted' +
189 ' to start with a drive letter. Unexpected error.'); 189 ' to start with a drive letter. Unexpected error.');
190 } 190 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 if (path != null) { 308 if (path != null) {
309 sb.write(", path = $path"); 309 sb.write(", path = $path");
310 } 310 }
311 } 311 }
312 return sb.toString(); 312 return sb.toString();
313 } 313 }
314 final String message; 314 final String message;
315 final String path; 315 final String path;
316 final OSError osError; 316 final OSError osError;
317 } 317 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/string_transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698