Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SetLength()

override void System.IO.FileStream.SetLength ( long value)
inlineinherited

Definition at line 383 of file FileStream.cs.

384 {
385 if (value < 0)
386 {
387 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.value, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
388 }
389 else if (_strategy.IsClosed)
390 {
391 ThrowHelper.ThrowObjectDisposedException_FileClosed();
392 }
393 else if (!CanSeek)
394 {
395 ThrowHelper.ThrowNotSupportedException_UnseekableStream();
396 }
397 else if (!CanWrite)
398 {
399 ThrowHelper.ThrowNotSupportedException_UnwritableStream();
400 }
402 }
readonly FileStreamStrategy _strategy
Definition FileStream.cs:12
override bool CanWrite
Definition FileStream.cs:19
override bool CanSeek
Definition FileStream.cs:67
void SetLength(long value)

References System.IO.FileStream._strategy, System.IO.FileStream.CanSeek, System.IO.FileStream.CanWrite, System.IO.Strategies.FileStreamStrategy.IsClosed, System.IO.Stream.SetLength(), System.ThrowHelper.ThrowArgumentOutOfRangeException(), System.ThrowHelper.ThrowNotSupportedException_UnseekableStream(), System.ThrowHelper.ThrowNotSupportedException_UnwritableStream(), System.ThrowHelper.ThrowObjectDisposedException_FileClosed(), and System.value.

Referenced by System.IO.IsolatedStorage.IsolatedStorageFileStream.SetLength().