Chromium Code Reviews| Index: sdk/lib/io/file_system_entity.dart |
| diff --git a/sdk/lib/io/file_system_entity.dart b/sdk/lib/io/file_system_entity.dart |
| index e13477b1c41e5b6c11e732e01977ccaa47d985b9..8bbba182abc70e3dd1356bdaa294e3eeb9a60a00 100644 |
| --- a/sdk/lib/io/file_system_entity.dart |
| +++ b/sdk/lib/io/file_system_entity.dart |
| @@ -35,6 +35,7 @@ abstract class FileSystemEntity { |
| String get path; |
| external static int _getType(String path, bool followLinks); |
| + external static bool _identical(String file1, String file2); |
| static int _getTypeSync(String path, bool followLinks) { |
| var result = _getType(path, followLinks); |
| @@ -42,6 +43,12 @@ abstract class FileSystemEntity { |
| return result; |
| } |
|
Søren Gjesse
2013/03/20 07:49:45
I think we need a doc comment here explaining exac
|
| + static bool identicalSync(String file1, String file2) { |
|
Søren Gjesse
2013/03/20 07:49:45
path1 and path2?
|
| + var result = _identical(file1, file2); |
| + _throwIfError(result, 'Error in FileSystemEntity.identical'); |
| + return result; |
| + } |
| + |
| static FileSystemEntityType typeSync(String path, {bool followLinks: true}) |
| => FileSystemEntityType._lookup(_getTypeSync(path, followLinks)); |
| @@ -57,6 +64,8 @@ abstract class FileSystemEntity { |
| static _throwIfError(Object result, String msg) { |
| if (result is OSError) { |
| throw new FileIOException(msg, result); |
| + } else if (result is ArgumentError) { |
| + throw result; |
| } |
| } |
| } |