*To = '\0';
return InitialTo;
}
+ virtual bool InternalFlush()
+ {
+ return true;
+ }
virtual ssize_t InternalWrite(void const * const From, unsigned long long const Size) = 0;
virtual bool InternalWriteError() { return filefd->FileFdErrno("write",_("Write error")); }
virtual bool InternalSeek(unsigned long long const To)
return d->InternalReadLine(To, Size);
}
/*}}}*/
+// FileFd::Flush - Flush the file /*{{{*/
+bool FileFd::Flush()
+{
+ if (d == nullptr)
+ return true;
+
+ return d->InternalFlush();
+}
+ /*}}}*/
// FileFd::Write - Write to the file /*{{{*/
bool FileFd::Write(const void *From,unsigned long long Size)
{
/* */
bool FileFd::Close()
{
+ if (Flush() == false)
+ return false;
if (iFd == -1)
return true;
}
bool Read(void *To,unsigned long long Size,unsigned long long *Actual = 0);
char* ReadLine(char *To, unsigned long long const Size);
+ bool Flush();
bool Write(const void *From,unsigned long long Size);
bool static Write(int Fd, const void *From, unsigned long long Size);
bool Seek(unsigned long long To);