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

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

Issue 16156009: dart:io | Add .stat() and .statSync() to FileSystemEntity and subclasses File, Directory, and Link. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 | « sdk/lib/io/file_system_entity.dart ('k') | tests/standalone/io/file_stat_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/link.dart
diff --git a/sdk/lib/io/link.dart b/sdk/lib/io/link.dart
index a179f668d6f1ed1e143f36cd09f3a6d955124cd3..ddca031277c5c8bc69bc0ee9957d4b63deccd648 100644
--- a/sdk/lib/io/link.dart
+++ b/sdk/lib/io/link.dart
@@ -8,7 +8,7 @@ part of dart.io;
* [Link] objects are references to filesystem links.
*
*/
-abstract class Link extends FileSystemEntity {
+abstract class Link implements FileSystemEntity {
/**
* Creates a Link object.
*/
@@ -119,6 +119,10 @@ class _Link extends FileSystemEntity implements Link {
bool existsSync() => FileSystemEntity.isLinkSync(path);
+ Future<FileStat> stat() => FileStat.stat(path);
+
+ FileStat statSync() => FileStat.statSync(path);
+
Future<Link> create(String target) {
_ensureFileService();
if (Platform.operatingSystem == 'windows') {
« no previous file with comments | « sdk/lib/io/file_system_entity.dart ('k') | tests/standalone/io/file_stat_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698