Index: runtime/bin/file.h |
diff --git a/runtime/bin/file.h b/runtime/bin/file.h |
index 0fdc398640235f500997b2283d2e12f51313be74..42507559470038c6f00caf51940c4cb6fdfb7094 100644 |
--- a/runtime/bin/file.h |
+++ b/runtime/bin/file.h |
@@ -25,6 +25,12 @@ typedef unsigned __int8 uint8_t; |
// Forward declaration. |
class FileHandle; |
+class OSError { |
Mads Ager (google)
2012/03/08 15:04:27
We should move this to some place more general.
Søren Gjesse
2012/03/08 22:50:53
Moved to utils.h, but maybe we should have platfor
|
+ public: |
+ int errno_; |
+ char* strerror_; |
+}; |
+ |
class File { |
public: |
enum FileOpenMode { |
@@ -111,7 +117,9 @@ class File { |
// reading and writing. If mode contains kWrite and the file does |
// not exist the file is created. The file is truncated to length 0 if |
// mode contains kTruncate. |
- static File* Open(const char* name, FileOpenMode mode); |
+ static File* Open(const char* name, |
+ FileOpenMode mode, |
+ OSError* os_error = NULL); |
// Create a file object for the specified stdio file descriptor |
// (stdin, stout or stderr). |