TDB2
- 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:
10
src/File.cpp
10
src/File.cpp
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user