- let filePath = Path.Combine (targetDirPath, metadata.get Metadata.filenameKey)
- let modificationTime = new DateTime (metadata.get Metadata.modificationTimeKey |> int64)
- let fileInfo = new FileInfo (filePath)
- using (fileInfo.Create ()) <| fun outputStream -> cryptoStream.CopyTo outputStream
+ let filePath = Path.Combine (targetDirPath, metadata.get MetadataKeys.filename)
+ let modificationTime = DateTime (metadata.get MetadataKeys.modificationTime |> int64)
+ let fileInfo = FileInfo filePath
+ using (fileInfo.Create ()) cryptoStream.CopyTo // We have to close the result file before updating the modification time.