#include <unistd.h>
#endif
#include <msp/strings/formatter.h>
-#include "error.h"
+#include "except.h"
#include "file.h"
using namespace std;
set_events(P_NONE);
- signal_closing.emit();
+ signal_flush_required.emit();
#ifdef WIN32
CloseHandle(handle);
#endif
}
+void File::sync()
+{
+#ifndef WIN32
+ signal_flush_required.emit();
+
+ fsync(handle);
+#endif
+}
+
/**
Seeks the file to the given byte offset.
{
check_access(M_NONE);
+ signal_flush_required.emit();
+
int type=sys_seek_type(st);
#ifdef WIN32
DWORD ret=SetFilePointer(handle, off, 0, type);
return ret;
}
-void File::sync()
-{
-#ifndef WIN32
- fsync(handle);
-#endif
-}
-
/**
Reads data from the file.