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

Unified Diff: runtime/bin/directory.dart

Issue 10938010: Switch from interfaces to abstract classes in dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Add test binaries. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/chunked_stream.dart ('k') | runtime/bin/file.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/directory.dart
diff --git a/runtime/bin/directory.dart b/runtime/bin/directory.dart
index 60e6bfd566ba9cb86ff9d2caca6346127841f604..7263f0b09e0be4ad6cdd2073975758165fe5b25e 100644
--- a/runtime/bin/directory.dart
+++ b/runtime/bin/directory.dart
@@ -5,26 +5,26 @@
/**
* [Directory] objects are used for working with directories.
*/
-interface Directory default _Directory {
+abstract class Directory {
/**
* Creates a directory object. The path is either an absolute path,
* or it is a relative path which is interpreted relative to the directory
* in which the Dart VM was started.
*/
- Directory(String path);
+ factory Directory(String path) => new _Directory(path);
/**
* Creates a directory object from a Path object. The path is either
* an absolute path, or it is a relative path which is interpreted
* relative to the directory in which the Dart VM was started.
*/
- Directory.fromPath(Path path);
+ factory Directory.fromPath(Path path) => new _Directory.fromPath(path);
/**
* Creates a directory object pointing to the current working
* directory.
*/
- Directory.current();
+ factory Directory.current() => new _Directory.current();
/**
* Check whether a directory with this name already exists. Returns
@@ -126,7 +126,7 @@ interface Directory default _Directory {
* operation. Handlers for files and directories should be
* registered on this DirectoryLister object.
*/
- DirectoryLister list([bool recursive]);
+ DirectoryLister list([bool recursive = false]);
/**
* Gets the path of this directory.
@@ -143,7 +143,7 @@ interface Directory default _Directory {
* called. If the listing operation is recursive, the error handler is
* called if a subdirectory cannot be opened for listing.
*/
-interface DirectoryLister default _DirectoryLister {
+abstract class DirectoryLister {
/**
* Sets the directory handler that is called for all directories
* during listing. The directory handler is called with the full
« no previous file with comments | « runtime/bin/chunked_stream.dart ('k') | runtime/bin/file.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698