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

Unified Diff: sdk/lib/io/directory_impl.dart

Issue 23054008: Remove the Path class from dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed first round of review comments Created 7 years, 4 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
Index: sdk/lib/io/directory_impl.dart
diff --git a/sdk/lib/io/directory_impl.dart b/sdk/lib/io/directory_impl.dart
index e27b6103f64f5ed26756ffce7092598accb0a157..39d36cfe22c5997a49c2a49a3a76e82c56a152ec 100644
--- a/sdk/lib/io/directory_impl.dart
+++ b/sdk/lib/io/directory_impl.dart
@@ -24,8 +24,6 @@ class _Directory implements Directory {
}
}
- _Directory.fromPath(Path path) : this(path.toNativePath());
-
external static String _current();
external static _setCurrent(path);
external static _createTemp(String template);
@@ -98,11 +96,11 @@ class _Directory implements Directory {
}
Future<Directory> createRecursively() {
- var path = new Path(this.path);
+ var path = new _Path(this.path);
var dirsToCreate = [];
var terminator = path.isAbsolute ? '/' : '';
while (path.toString() != terminator) {
- dirsToCreate.add(new Directory.fromPath(path));
+ dirsToCreate.add(new Directory(path.toNativePath()));
path = path.directoryPath;
}
return _computeExistingIndex(dirsToCreate).then((index) {
@@ -139,11 +137,11 @@ class _Directory implements Directory {
}
void createRecursivelySync() {
- var path = new Path(this.path);
+ var path = new _Path(this.path);
var dirsToCreate = [];
var terminator = path.isAbsolute ? '/' : '';
while (path.toString() != terminator) {
- var dir = new Directory.fromPath(path);
+ var dir = new Directory(path.toNativePath());
if (dir.existsSync()) break;
dirsToCreate.add(dir);
path = path.directoryPath;

Powered by Google App Engine
This is Rietveld 408576698