[Kernel] Add support for XFileEndOfFileInformation.
This commit is contained in:
@@ -115,6 +115,17 @@ class Win32FileHandle : public FileHandle {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
bool SetLength(size_t length) {
|
||||
LARGE_INTEGER position;
|
||||
position.QuadPart = length;
|
||||
if (!SetFilePointerEx(handle_, position, nullptr, SEEK_SET)) {
|
||||
return false;
|
||||
}
|
||||
if (!SetEndOfFile(handle_)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void Flush() override { FlushFileBuffers(handle_); }
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user