- Full implementation of TDB2::add, which includes pending/completed, undo
  and backlog.
- Removed obsolete TF2::commitUndo, which is no longer necessary.
- Added File::truncate method, to allow a TDB2 shortcut.
This commit is contained in:
Paul Beckingham 2011-08-25 00:29:54 -04:00
parent 02df3853f7
commit fb6dc5058f
4 changed files with 69 additions and 71 deletions

View file

@ -280,6 +280,16 @@ void File::append (const std::vector <std::string>& lines)
}
}
////////////////////////////////////////////////////////////////////////////////
void File::truncate ()
{
if (!fh)
open ();
if (fh)
ftruncate (h, 0);
}
////////////////////////////////////////////////////////////////////////////////
// S_IFMT 0170000 type of file
// S_IFIFO 0010000 named pipe (fifo)