mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-08 07:53:17 +02:00
gio: Implement GioStream.SetLength
This commit is contained in:
parent
5290f4c520
commit
f6009bbde1
@ -218,9 +218,16 @@ namespace GLib
|
|||||||
{
|
{
|
||||||
if (!CanSeek || !CanWrite)
|
if (!CanSeek || !CanWrite)
|
||||||
throw new NotSupportedException ("This stream doesn't support seeking");
|
throw new NotSupportedException ("This stream doesn't support seeking");
|
||||||
|
|
||||||
|
var seekable = stream as Seekable;
|
||||||
|
|
||||||
|
if (!seekable.CanTruncate ())
|
||||||
|
throw new NotSupportedException ("This stream doesn't support truncating");
|
||||||
|
|
||||||
if (is_disposed)
|
if (is_disposed)
|
||||||
throw new ObjectDisposedException ("The stream is closed");
|
throw new ObjectDisposedException ("The stream is closed");
|
||||||
throw new NotImplementedException ();
|
|
||||||
|
seekable.Truncate (value, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Close ()
|
public override void Close ()
|
||||||
|
Loading…
Reference in New Issue
Block a user