示例#1
0
        public FileStream(string filePath, MarkerMetro.Unity.WinLegacy.IO.FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
        {
            filePath = filePath.FixPath();
#if NETFX_CORE
            var task = OpenFileStreamAsync(filePath, mode, access, share, bufferSize);

            task.Wait();

            if (task.IsFaulted)
            {
                throw task.Exception;
            }

            this.stream = task.Result;
#else
            this.stream = new System.IO.FileStream(filePath, mode.ToSystemIO());
#endif
        }
示例#2
0
 public FileStream(string filePath, MarkerMetro.Unity.WinLegacy.IO.FileMode mode, FileAccess access, FileShare share)
     : this(filePath, mode, access, share, 4096)
 {
 }
示例#3
0
 public FileStream(string filePath, MarkerMetro.Unity.WinLegacy.IO.FileMode mode)
     : this(filePath, mode, FileAccess.ReadWrite)
 {
 }