mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Tools/Extractors: Swapped to new casclib 64bit file size functions
This commit is contained in:
@@ -40,20 +40,20 @@ bool DB2FileSystemSource::Read(void* buffer, std::size_t numBytes)
|
||||
return fread(buffer, numBytes, 1, _file) == 1;
|
||||
}
|
||||
|
||||
std::size_t DB2FileSystemSource::GetPosition() const
|
||||
int64 DB2FileSystemSource::GetPosition() const
|
||||
{
|
||||
return ftell(_file);
|
||||
}
|
||||
|
||||
bool DB2FileSystemSource::SetPosition(std::size_t position)
|
||||
bool DB2FileSystemSource::SetPosition(int64 position)
|
||||
{
|
||||
return fseek(_file, position, SEEK_SET) == 0;
|
||||
}
|
||||
|
||||
std::size_t DB2FileSystemSource::GetFileSize() const
|
||||
int64 DB2FileSystemSource::GetFileSize() const
|
||||
{
|
||||
boost::system::error_code error;
|
||||
std::size_t size = boost::filesystem::file_size(_fileName, error);
|
||||
int64 size = boost::filesystem::file_size(_fileName, error);
|
||||
return !error ? size : 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user