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

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

Issue 281723004: Fix Directory, File and Link constructor text. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
« sdk/lib/io/directory.dart ('K') | « sdk/lib/io/file.dart ('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) 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 */
11 abstract class Link extends FileSystemEntity { 11 abstract class Link extends FileSystemEntity {
12 /** 12 /**
13 * Creates a Link object. 13 * Creates a Link object.
14 */ 14 */
15 factory Link(String path) => new _Link(path); 15 factory Link(String path) => new _Link(path);
16 16
17 /** 17 /**
18 * Create a Lint object from a URI. 18 * Creates a [Link] object.
19 * 19 *
20 * If [uri] cannot reference a link this throws [UnsupportedError]. 20 * The path is either an absolute path,
21 * or it is a relative path which is interpreted relative to the current
22 * working directory (see [Directory.current]).
21 */ 23 */
22 factory Link.fromUri(Uri uri) => new Link(uri.toFilePath()); 24 factory Link.fromUri(Uri uri) => new Link(uri.toFilePath());
23 25
24 /** 26 /**
25 * Creates a symbolic link. Returns a [:Future<Link>:] that completes with 27 * Creates a symbolic link. Returns a [:Future<Link>:] that completes with
26 * the link when it has been created. If the link exists, 28 * the link when it has been created. If the link exists,
27 * the future will complete with an error. 29 * the future will complete with an error.
28 * 30 *
29 * If [recursive] is false, the default, the link is created 31 * If [recursive] is false, the default, the link is created
30 * only if all directories in its path exist. 32 * only if all directories in its path exist.
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 return new ArgumentError(); 294 return new ArgumentError();
293 case _OSERROR_RESPONSE: 295 case _OSERROR_RESPONSE:
294 var err = new OSError(response[_OSERROR_RESPONSE_MESSAGE], 296 var err = new OSError(response[_OSERROR_RESPONSE_MESSAGE],
295 response[_OSERROR_RESPONSE_ERROR_CODE]); 297 response[_OSERROR_RESPONSE_ERROR_CODE]);
296 return new FileSystemException(message, path, err); 298 return new FileSystemException(message, path, err);
297 default: 299 default:
298 return new Exception("Unknown error"); 300 return new Exception("Unknown error");
299 } 301 }
300 } 302 }
301 } 303 }
OLDNEW
« sdk/lib/io/directory.dart ('K') | « sdk/lib/io/file.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698