Core/Posix: Add absolutly not tested File::SetSize implementation
At least the engine should compile again on posix Former-commit-id: c2ccdb9ad939b20e288b211aee678917934f1757
This commit is contained in:
parent
371922ec11
commit
08926cf530
|
|
@ -118,6 +118,11 @@ namespace Nz
|
|||
return lseek64(m_fileDescriptor, offset, moveMethod) != -1;
|
||||
}
|
||||
|
||||
bool FileImpl::SetSize(UInt64 size)
|
||||
{
|
||||
return ftruncate64(m_fileDescriptor, size) != 0;
|
||||
}
|
||||
|
||||
std::size_t FileImpl::Write(const void* buffer, std::size_t size)
|
||||
{
|
||||
lockf64(m_fileDescriptor, F_LOCK, size);
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ namespace Nz
|
|||
bool Open(const String& filePath, UInt32 mode);
|
||||
std::size_t Read(void* buffer, std::size_t size);
|
||||
bool SetCursorPos(CursorPosition pos, Int64 offset);
|
||||
bool SetSize(UInt64 size);
|
||||
std::size_t Write(const void* buffer, std::size_t size);
|
||||
|
||||
FileImpl& operator=(const FileImpl&) = delete;
|
||||
|
|
|
|||
Loading…
Reference in New Issue