Created
March 5, 2013 22:23
-
-
Save timsavery/5094895 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public byte[] RetrieveReportFileChunkable(int reportID, Chatham.Libraries.Enumerations.Report reportType) | |
{ | |
FileInfo targetFile; | |
if (reportType == Chatham.Libraries.Enumerations.Report.FMSDataIntegration) | |
{ | |
// We save data feed files as xml | |
targetFile = new FileInfo(DocumentManagementHelper.CachedDataFeedFileName(reportID)); | |
} | |
else | |
{ | |
targetFile = new FileInfo(DocumentManagementHelper.CachedReportFileName(reportID)); | |
} | |
using (FileStream stream = targetFile.Open(FileMode.Open, FileAccess.Read, FileShare.Read)) { | |
var buffer = new byte[stream.Length]; | |
stream.Read(buffer, 0, buffer.Length); | |
return buffer; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment