Index: pkg/webdriver/lib/webdriver.dart |
diff --git a/pkg/webdriver/lib/webdriver.dart b/pkg/webdriver/lib/webdriver.dart |
index 837836bd4c49944df5e550f69392d0864bd773d6..ffb0dff91cd02812da923769ef67fabefa7b2175 100644 |
--- a/pkg/webdriver/lib/webdriver.dart |
+++ b/pkg/webdriver/lib/webdriver.dart |
@@ -52,17 +52,11 @@ part 'src/base64decoder.dart'; |
*/ |
void writeStringToFile(String fileName, String contents) { |
- var file = new File(fileName); |
- var ostream = file.openOutputStream(FileMode.WRITE); |
- ostream.writeString(contents); |
- ostream.close(); |
+ new File(fileName).writeAsStringSync(contents); |
} |
void writeBytesToFile(String fileName, List<int> contents) { |
- var file = new File(fileName); |
- var ostream = file.openOutputStream(FileMode.WRITE); |
- ostream.write(contents); |
- ostream.close(); |
+ new File(fileName).writeAsBytesSync(contents); |
} |
class WebDriverError { |