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

Unified Diff: runtime/bin/file_impl.dart

Issue 10639004: Add .fromPath constructors to File and Directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/file.dart ('k') | tests/standalone/io/directory_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_impl.dart
diff --git a/runtime/bin/file_impl.dart b/runtime/bin/file_impl.dart
index 7900aef3586b6e35230033b015436d82b4db1c77..e1ff548fb669cfe7ba00be357490453da5ea5226 100644
--- a/runtime/bin/file_impl.dart
+++ b/runtime/bin/file_impl.dart
@@ -492,6 +492,9 @@ class _File extends _FileBase implements File {
// Constructor for file.
_File(String this._name);
+ // Constructor from Path for file.
+ _File.fromPath(Path path) : this(path.toNativePath());
+
Future<bool> exists() {
_ensureFileService();
List request = new List(2);
« no previous file with comments | « runtime/bin/file.dart ('k') | tests/standalone/io/directory_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698