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

Side by Side Diff: sdk/lib/io/file.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 | « sdk/lib/io/directory_impl.dart ('k') | sdk/lib/io/file_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) 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 * FileMode describes the modes in which a file can be opened. 8 * FileMode describes the modes in which a file can be opened.
9 */ 9 */
10 class FileMode { 10 class FileMode {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 Future<int> length(); 92 Future<int> length();
93 93
94 /** 94 /**
95 * Synchronously get the length of the file. 95 * Synchronously get the length of the file.
96 * 96 *
97 * Throws a [FileException] if the operation fails. 97 * Throws a [FileException] if the operation fails.
98 */ 98 */
99 int lengthSync(); 99 int lengthSync();
100 100
101 /** 101 /**
102 * Returns a [File] instance whose path is the absolute path to [this].
103 *
104 * The absolute path is computed by prefixing
105 * a relative path with the current working directory, and returning
106 * an absolute path unchanged.
107 */
108 File get absolute;
109
110 /**
102 * Get the last-modified time of the file. Returns a 111 * Get the last-modified time of the file. Returns a
103 * [:Future<DateTime>:] that completes with a [DateTime] object for the 112 * [:Future<DateTime>:] that completes with a [DateTime] object for the
104 * modification date. 113 * modification date.
105 */ 114 */
106 Future<DateTime> lastModified(); 115 Future<DateTime> lastModified();
107 116
108 /** 117 /**
109 * Get the last-modified time of the file. Throws an exception 118 * Get the last-modified time of the file. Throws an exception
110 * if the file does not exist. 119 * if the file does not exist.
111 * 120 *
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 } 534 }
526 } else if (osError != null) { 535 } else if (osError != null) {
527 sb.write(": osError"); 536 sb.write(": osError");
528 if (path != null) { 537 if (path != null) {
529 sb.write(", path = $path"); 538 sb.write(", path = $path");
530 } 539 }
531 } 540 }
532 return sb.toString(); 541 return sb.toString();
533 } 542 }
534 } 543 }
OLDNEW
« no previous file with comments | « sdk/lib/io/directory_impl.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698