mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:27:46 +00:00
LibCore+Tests: Add SeekableStream::truncate()
This commit is contained in:
parent
d9fb1b8c2e
commit
4d5080388a
4 changed files with 27 additions and 0 deletions
|
@ -215,6 +215,11 @@ ErrorOr<off_t> File::seek(i64 offset, SeekMode mode)
|
|||
return seek_result;
|
||||
}
|
||||
|
||||
ErrorOr<void> File::truncate(off_t length)
|
||||
{
|
||||
return System::ftruncate(m_fd, length);
|
||||
}
|
||||
|
||||
ErrorOr<int> Socket::create_fd(SocketDomain domain, SocketType type)
|
||||
{
|
||||
int socket_domain;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue