This reverts commit 179cb50557.
This commit is contained in:
parent
179cb50557
commit
c2ecc76457
588 changed files with 16260 additions and 10926 deletions
|
|
@ -18,9 +18,16 @@
|
|||
*
|
||||
***************************************************************************/
|
||||
|
||||
using System.IO;
|
||||
|
||||
namespace Server.Persistence
|
||||
using System;
|
||||
using System.IO;
|
||||
#if !MONO
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
|
||||
#endif
|
||||
|
||||
namespace Server
|
||||
{
|
||||
public static class FileOperations
|
||||
{
|
||||
|
|
@ -31,8 +38,12 @@ namespace Server.Persistence
|
|||
|
||||
public static int Concurrency{ get; set; } = 1;
|
||||
|
||||
public static bool Unbuffered{ get; set; } = true;
|
||||
|
||||
public static bool AreSynchronous => Concurrency < 1;
|
||||
|
||||
public static bool AreAsynchronous => Concurrency > 0;
|
||||
|
||||
public static FileStream OpenSequentialStream(string path, FileMode mode, FileAccess access, FileShare share)
|
||||
{
|
||||
FileOptions options = FileOptions.SequentialScan;
|
||||
|
|
@ -93,5 +104,6 @@ namespace Server.Persistence
|
|||
internal static extern SafeFileHandle CreateFile(string lpFileName, int dwDesiredAccess, FileShare dwShareMode,
|
||||
IntPtr securityAttrs, FileMode dwCreationDisposition, int dwFlagsAndAttributes, IntPtr hTemplateFile);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue