Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.IO.Strategies.FileStreamHelpers Class Reference

Classes

class  AsyncCopyToAwaitable
 

Static Package Functions

static FileStreamStrategy ChooseStrategy (FileStream fileStream, SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync)
 
static FileStreamStrategy ChooseStrategy (FileStream fileStream, string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options, long preallocationSize)
 
static bool IsIoRelatedException (Exception e)
 
static void ValidateArguments (string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options, long preallocationSize)
 
static void ValidateArgumentsForPreallocation (FileMode mode, FileAccess access)
 
static void SerializationGuard (FileAccess access)
 
static void FlushToDisk (SafeFileHandle handle)
 
static long Seek (SafeFileHandle handle, long offset, SeekOrigin origin, bool closeInvalidHandle=false)
 
static void ThrowInvalidArgument (SafeFileHandle handle)
 
static int GetLastWin32ErrorAndDisposeHandleIfInvalid (SafeFileHandle handle)
 
static void Lock (SafeFileHandle handle, bool canWrite, long position, long length)
 
static void Unlock (SafeFileHandle handle, long position, long length)
 
static void SetFileLength (SafeFileHandle handle, long length)
 
static unsafe bool TrySetFileLength (SafeFileHandle handle, long length, out int errorCode)
 
static unsafe int ReadFileNative (SafeFileHandle handle, Span< byte > bytes, NativeOverlapped *overlapped, out int errorCode)
 
static unsafe async Task AsyncModeCopyToAsync (SafeFileHandle handle, bool canSeek, long filePosition, Stream destination, int bufferSize, CancellationToken cancellationToken)
 

Properties

static bool UseNet5CompatStrategy = AppContextConfigHelper.GetBooleanConfig("System.IO.UseNet5CompatFileStream", "DOTNET_SYSTEM_IO_USENET5COMPATFILESTREAM") [get]
 

Static Private Member Functions

static FileStreamStrategy EnableBufferingIfNeeded (FileStreamStrategy strategy, int bufferSize)
 
static FileStreamStrategy WrapIfDerivedType (FileStream fileStream, FileStreamStrategy strategy)
 
static OSFileStreamStrategy ChooseStrategyCore (SafeFileHandle handle, FileAccess access, bool isAsync)
 
static FileStreamStrategy ChooseStrategyCore (string path, FileMode mode, FileAccess access, FileShare share, FileOptions options, long preallocationSize)
 

Static Private Attributes

static int s_cachedSerializationSwitch
 

Detailed Description

Definition at line 11 of file FileStreamHelpers.cs.


The documentation for this class was generated from the following file: