streams: remove AutoFile::Get() entirely

Co-Authored-By: David Gumberg <davidzgumberg@gmail.com>
This commit is contained in:
Pieter Wuille
2024-09-13 21:59:29 -04:00
parent e624a9bef1
commit a240e150e8
7 changed files with 27 additions and 14 deletions

View File

@@ -4,6 +4,7 @@
#include <span.h>
#include <streams.h>
#include <util/fs_helpers.h>
#include <array>
@@ -99,3 +100,18 @@ void AutoFile::write(Span<const std::byte> src)
}
}
}
bool AutoFile::Commit()
{
return ::FileCommit(m_file);
}
bool AutoFile::IsError()
{
return ferror(m_file);
}
bool AutoFile::Truncate(unsigned size)
{
return ::TruncateFile(m_file, size);
}