/// <exception cref="System.IO.FileNotFoundException"></exception> private void OpenTempFile() { string uuid = Misc.TDCreateUUID(); string filename = string.Format("{0}.blobtmp", uuid); FilePath tempDir = store.TempDir(); tempFile = new FilePath(tempDir, filename); outStream = new BufferedOutputStream(new FileOutputStream(tempFile)); }
/// <exception cref="System.IO.FileNotFoundException"></exception> private void OpenTempFile() { string uuid = Misc.CreateGUID(); string filename = string.Format("{0}.blobtmp", uuid); var tempDir = store.TempDir(); tempFile = Path.Combine(tempDir, filename); if (store.EncryptionKey == null) { outStream = new BufferedStream(File.Open(tempFile, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite)); } else { outStream = store.EncryptionKey.CreateStream( new BufferedStream(File.Open(tempFile, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite))); } }