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

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

Issue 15832003: Change File.directory to not do any IO (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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/_internal/compiler/implementation/lib/io_patch.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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 /** 87 /**
88 * Synchronously delete the file. Only a file or a link to a file 88 * Synchronously delete the file. Only a file or a link to a file
89 * can be deleted with this method, not a directory or a broken link. 89 * can be deleted with this method, not a directory or a broken link.
90 * 90 *
91 * Throws a [FileIOException] if the operation fails. 91 * Throws a [FileIOException] if the operation fails.
92 */ 92 */
93 void deleteSync(); 93 void deleteSync();
94 94
95 /** 95 /**
96 * Get a [Directory] object for the directory containing this 96 * Get a [Directory] object for the directory containing this
97 * file. Returns a [:Future<Directory>:] that completes with the 97 * file.
98 * directory.
99 */ 98 */
100 Future<Directory> directory(); 99 Directory get directory;
101
102 /**
103 * Synchronously get a [Directory] object for the directory containing
104 * this file.
105 *
106 * Throws a [FileIOException] if the operation fails.
107 */
108 Directory directorySync();
109 100
110 /** 101 /**
111 * Get the length of the file. Returns a [:Future<int>:] that 102 * Get the length of the file. Returns a [:Future<int>:] that
112 * completes with the length in bytes. 103 * completes with the length in bytes.
113 */ 104 */
114 Future<int> length(); 105 Future<int> length();
115 106
116 /** 107 /**
117 * Synchronously get the length of the file. 108 * Synchronously get the length of the file.
118 * 109 *
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 sb.write(" ($osError)"); 529 sb.write(" ($osError)");
539 } 530 }
540 } else if (osError != null) { 531 } else if (osError != null) {
541 sb.write(": osError"); 532 sb.write(": osError");
542 } 533 }
543 return sb.toString(); 534 return sb.toString();
544 } 535 }
545 final String message; 536 final String message;
546 final OSError osError; 537 final OSError osError;
547 } 538 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/io_patch.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698