Adding CreateFile on IStorageFile

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-04-08 14:53:26 -07:00
parent 6bf32dbbfb
commit 7353fe5f58
6 changed files with 68 additions and 19 deletions

View File

@@ -121,10 +121,9 @@ namespace Orchard.Recipes.Services {
private static void WriteJournal(IStorageFile journalFile, XElement journal) {
string content = journal.ToString();
using (var stream = journalFile.OpenWrite()) {
using (var stream = journalFile.CreateFile()) {
using (var tw = new StreamWriter(stream)) {
tw.Write(content);
stream.SetLength(stream.Position);
}
}
}