]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/file.h
Added wxStandardPaths
[wxWidgets.git] / include / wx / file.h
index 15b35b8d83776ec0cfdc1e74d5a1764c2bbb8f1d..6a46ec7fe476dec46b482e4b097e7dcfbfad04ff 100644 (file)
@@ -108,12 +108,12 @@ public:
     // flush data not yet written
   bool Flush();
 
-  // file pointer operations (return ofsInvalid on failure)
-    // move ptr ofs bytes related to start/current off_t/end of file
+  // file pointer operations (return wxInvalidOffset on failure)
+    // move ptr ofs bytes related to start/current offset/end of file
   wxFileOffset Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart);
     // move ptr to ofs bytes before the end
   wxFileOffset SeekEnd(wxFileOffset ofs = 0) { return Seek(ofs, wxFromEnd); }
-    // get current off_t
+    // get current offset
   wxFileOffset Tell() const;
     // get current file length
   wxFileOffset Length() const;
@@ -164,7 +164,7 @@ public:
   bool IsOpened() const { return m_file.IsOpened(); }
 
   // I/O (both functions return true on success, false on failure)
-  bool Write(const void *p, size_t n) { return m_file.Write(p, n) != 0; }
+  bool Write(const void *p, size_t n) { return m_file.Write(p, n) == n; }
   bool Write(const wxString& str, wxMBConv& conv = wxConvUTF8)
     { return m_file.Write(str, conv); }