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

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

Issue 23468027: Add FileSystemEntity.absolutePath and .isAbsolute properties. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Change name to absolute, return type to File, Directory, and Link. Created 7 years, 3 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 | sdk/lib/io/directory_impl.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 /** 7 /**
8 * [Directory] objects are used for working with directories. 8 * [Directory] objects are used for working with directories.
9 */ 9 */
10 abstract class Directory implements FileSystemEntity { 10 abstract class Directory implements FileSystemEntity {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 * Synchronously renames this directory. Returns a [Directory] 102 * Synchronously renames this directory. Returns a [Directory]
103 * instance for the renamed directory. 103 * instance for the renamed directory.
104 * 104 *
105 * If newPath identifies an existing directory, that directory is 105 * If newPath identifies an existing directory, that directory is
106 * replaced. If newPath identifies an existing file the operation 106 * replaced. If newPath identifies an existing file the operation
107 * fails and an exception is thrown. 107 * fails and an exception is thrown.
108 */ 108 */
109 Directory renameSync(String newPath); 109 Directory renameSync(String newPath);
110 110
111 /** 111 /**
112 * Returns a [Directory] instance whose path is the absolute path to [this].
113 *
114 * The absolute path is computed by prefixing
115 * a relative path with the current working directory, and returning
116 * an absolute path unchanged.
117 */
118 Directory get absolute;
119
120 /**
112 * Lists the sub-directories and files of this [Directory]. 121 * Lists the sub-directories and files of this [Directory].
113 * Optionally recurses into sub-directories. 122 * Optionally recurses into sub-directories.
114 * 123 *
115 * If [followLinks] is false, then any symbolic links found 124 * If [followLinks] is false, then any symbolic links found
116 * are reported as [Link] objects, rather than as directories or files, 125 * are reported as [Link] objects, rather than as directories or files,
117 * and are not recursed into. 126 * and are not recursed into.
118 * 127 *
119 * If [followLinks] is true, then working links are reported as 128 * If [followLinks] is true, then working links are reported as
120 * directories or files, depending on 129 * directories or files, depending on
121 * their type, and links to directories are recursed into. 130 * their type, and links to directories are recursed into.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 if (path != null) { 195 if (path != null) {
187 sb.write(", path = $path"); 196 sb.write(", path = $path");
188 } 197 }
189 } 198 }
190 return sb.toString(); 199 return sb.toString();
191 } 200 }
192 final String message; 201 final String message;
193 final String path; 202 final String path;
194 final OSError osError; 203 final OSError osError;
195 } 204 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/directory_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698