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

Unified Diff: runtime/bin/file.h

Issue 9630012: Error reporting on File in dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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
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).
« no previous file with comments | « runtime/bin/directory_impl.dart ('k') | runtime/bin/file.cc » ('j') | runtime/bin/file_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698