mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-22 20:58:09 +02:00
streams: remove AutoFile::Get() entirely
Co-Authored-By: David Gumberg <davidzgumberg@gmail.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user