Index: lib/io/directory_impl.dart |
diff --git a/runtime/bin/directory_impl.dart b/lib/io/directory_impl.dart |
similarity index 93% |
rename from runtime/bin/directory_impl.dart |
rename to lib/io/directory_impl.dart |
index f4b43f1908268c1ed633b86db8b946c520e8c6fb..b805f0fe222e9595dff4f108e3d51c6584ee3194 100644 |
--- a/runtime/bin/directory_impl.dart |
+++ b/lib/io/directory_impl.dart |
@@ -19,13 +19,13 @@ class _Directory implements Directory { |
_Directory.fromPath(Path path) : this(path.toNativePath()); |
_Directory.current() : this(_current()); |
- static String _current() native "Directory_Current"; |
- static _createTemp(String template) native "Directory_CreateTemp"; |
- static int _exists(String path) native "Directory_Exists"; |
- static _create(String path) native "Directory_Create"; |
- static _delete(String path, bool recursive) native "Directory_Delete"; |
- static _rename(String path, String newPath) native "Directory_Rename"; |
- static SendPort _newServicePort() native "Directory_NewServicePort"; |
+ external static String _current(); |
+ external static _createTemp(String template); |
Søren Gjesse
2012/10/30 09:28:32
Should we use void where there is no return type?
Mads Ager (google)
2012/10/30 11:12:40
There is a return value but it can be either an OS
|
+ external static int _exists(String path); |
+ external static _create(String path); |
+ external static _delete(String path, bool recursive); |
+ external static _rename(String path, String newPath); |
+ external static SendPort _newServicePort(); |
Future<bool> exists() { |
_ensureDirectoryService(); |
@@ -113,7 +113,6 @@ class _Directory implements Directory { |
} |
return this; |
}); |
- return completer.future; |
} |
Future<Directory> delete() { |
@@ -179,7 +178,7 @@ class _Directory implements Directory { |
return response is List && response[0] != _SUCCESS_RESPONSE; |
} |
- Exception _exceptionFromResponse(response, String message) { |
+ _exceptionFromResponse(response, String message) { |
Søren Gjesse
2012/10/30 09:28:32
_exceptionFromResponse -> _exceptionOrErrorFromRes
Mads Ager (google)
2012/10/30 11:12:40
Done.
|
assert(_isErrorResponse(response)); |
switch (response[_ERROR_RESPONSE_ERROR_TYPE]) { |
case _ILLEGAL_ARGUMENT_RESPONSE: |