/////////////////////////////////////////////////////////////////////////////
-/**
- We redefine these constants here because S_IREAD &c are _not_ standard.
- However, we do assume that the values correspond to the Unix umask bits.
-*/
-enum wxPosixPermissions
-{
- /// standard Posix names for these permission flags
- //@{
- wxS_IRUSR = 00400,
- wxS_IWUSR = 00200,
- wxS_IXUSR = 00100,
-
- wxS_IRGRP = 00040,
- wxS_IWGRP = 00020,
- wxS_IXGRP = 00010,
-
- wxS_IROTH = 00004,
- wxS_IWOTH = 00002,
- wxS_IXOTH = 00001,
- //@}
-
- /// longer but more readable synonims for the constants above
- //@{
- wxPOSIX_USER_READ = wxS_IRUSR,
- wxPOSIX_USER_WRITE = wxS_IWUSR,
- wxPOSIX_USER_EXECUTE = wxS_IXUSR,
-
- wxPOSIX_GROUP_READ = wxS_IRGRP,
- wxPOSIX_GROUP_WRITE = wxS_IWGRP,
- wxPOSIX_GROUP_EXECUTE = wxS_IXGRP,
-
- wxPOSIX_OTHERS_READ = wxS_IROTH,
- wxPOSIX_OTHERS_WRITE = wxS_IWOTH,
- wxPOSIX_OTHERS_EXECUTE = wxS_IXOTH,
- //@}
-
- /// Default mode for the new files: allow reading/writing them to everybody but
- /// the effective file mode will be set after ANDing this value with umask and
- /// so won't include wxS_IW{GRP,OTH} for the default 022 umask value
- wxS_DEFAULT = (wxPOSIX_USER_READ | wxPOSIX_USER_WRITE | \
- wxPOSIX_GROUP_READ | wxPOSIX_GROUP_WRITE | \
- wxPOSIX_OTHERS_READ | wxPOSIX_OTHERS_WRITE),
-
- /// Default mode for the new directories (see wxFileName::Mkdir): allow
- /// reading/writing/executing them to everybody, but just like wxS_DEFAULT
- /// the effective directory mode will be set after ANDing this value with umask
- wxS_DIR_DEFAULT = (wxPOSIX_USER_READ | wxPOSIX_USER_WRITE | wxPOSIX_USER_EXECUTE | \
- wxPOSIX_GROUP_READ | wxPOSIX_GROUP_WRITE | wxPOSIX_GROUP_EXECUTE | \
- wxPOSIX_OTHERS_READ | wxPOSIX_OTHERS_WRITE | wxPOSIX_OTHERS_EXECUTE)
-};
-
-
-
/**
@class wxTempFile
*/
void Discard();
+ /**
+ Flush the data written to the file to disk.
+
+ This simply calls wxFile::Flush() for the underlying file and may be
+ necessary with file systems such as XFS and Ext4 under Linux. Calling
+ this function may however have serious performance implications and
+ also is not necessary with many other file systems so it is not done by
+ default -- but you can call it before calling Commit() to absolutely
+ ensure that the data was indeed written to the disk correctly.
+ */
+ bool Flush();
+
/**
Returns @true if the file was successfully opened.
*/